Question

1
Replies
35
Views
VarunPodaralla Member since 2016 2 posts
Excellus BCBS
Posted: 2 years ago
Last activity: 2 years ago
Closed

How to get the WorkItemId when using StartAndWait method

Hi,

I am using activity StartAndWait method to perform a set of tasks and also I wanted to use CancelActivity (for cancelling the activity started using StartAndWait method) when a user clicks stop button on the windows UI.

From the answer in this post: Kill Interaction and activity in the middle

I got to know that WorkItemId is returned when using StartActivity method but can you please elaborate on how to get the WorkItemId when using StartAndWait method as the return type is WorkItemResult rather than an integer as in the case of StartActivity.

I have also referred to the link https://community1.pega.com/community/product-support/question/how-know-workitemid-value-activity but there isn't definite answer. Please help me in this regard.

NOTE: As a work around for time being, I got to know the WorkItemId value using StartActivity in the debug mode and hardcoded the integer value parameter in the CancelActivity method. I would like to get the WorkItemId value during runtime and assign the same value to CancelActivity method.

Thanks,

Varun

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn