Question

Create work object from activity with help agent

Hello

We have a requirement to create a work object of a specific case type every month on the 6th day for all operators of a certain access group.
We think that for this task need to use agents and in the agent create activity for creating cases and assignments to the operator (cases should not be immediately started, they should be displayed in the work list of the operator that was assigned).

In flow pyStartCase of the case type are defined 2 parameters and we need to be able to determine them in activity.

How we can start an activity from an agent that creates a working object of a specific case type and set parameters for pyStartCase? It is urgent, I hope for your help

Correct Answer
December 21, 2018 - 2:21am

Hi,
Use activity "createWorkPage" to create a workpage for the casetype you want. You can specify the data transform to be used to initialize properties.
Then use activity "addWork" if it is a stand alone work object or use "addCoveredWork" if it is a covered work object.

Comments

Keep up to date on this post and subscribe to comments

December 18, 2018 - 5:57am

Hello,

Have you tried to work with Work-.StartNewFlow activity maybe? What Pega version are you running? 

December 18, 2018 - 6:39am
Response to MarcLasserre_GCS

Hi, Marc

I use Pega 7.4 version. In this activity "Work-." This is the name of the case type class. That is, if I use the Work-MyClass class, then this activity will look like "Work-MyClass.StartNewFlow"?

Thanks

December 19, 2018 - 6:02am
Response to ElizabethC0768

Well,

At runtime the system will find the Acivity anyway because your "Work-MyClass" will inherit from "Work-" I believe.

December 19, 2018 - 9:02am
Response to MarcLasserre_GCS

When I try call this activity, I get the following error. Maybe I'm doing something wrong?

December 19, 2018 - 9:12am
Response to MarcLasserre_GCS

And I cannot specify the value of the parameters that the pyStartCase in this activity. Is there some way to solve this problem? Thank

December 20, 2018 - 5:42am
Response to ElizabethC0768

Is the activity been called correctly? Have you trace it.

December 21, 2018 - 1:33am
Response to MarcLasserre_GCS

 

I trace this activity the results will be presented in the screenshots below.

Tracer 1:

Tracer 2:

Below is a screenshot with the text of the error. It is the same for all three errors.

December 21, 2018 - 2:21am

Hi,
Use activity "createWorkPage" to create a workpage for the casetype you want. You can specify the data transform to be used to initialize properties.
Then use activity "addWork" if it is a stand alone work object or use "addCoveredWork" if it is a covered work object.

January 14, 2019 - 2:14am
Response to MahendraK9977

Hi

Thanks for your solution, it works. But I can’t set a value when creating a case using data transform. Could you share an example of using data transform for this task?

October 31, 2019 - 10:44am
Response to ElizabethC0768

Hi,

Were you able to fix your problem? I'm having similar issues.

October 31, 2019 - 3:00pm
Response to FlorenceE

Have you tried the reply that was marked as the Correct Answer?

Marissa | Community Moderator | Pegasystems Inc.