Question

Calling Robot task from Pega in a scheduled way via agent

Hi,

I am trying to call a robot task in an scheduled way from Pega with an agent and I have found some problems that I have not resolved yet. I am using Pega 7.3.1. I have got a case type to call a robot task (see image1). When I create a new case work of type "RPA Example" the robot works and complete its assignment.

What I am looking for is to create one of this case work in a scheduled way. To do this I am trying to configure an agent. I have created an activity (see Image 2 and Image 3) and when it runs it seems to work.

I have two problems at this point.

- Although the activity seems to work in a dry way (see Image 4), the assignment to the robot is not working. Maybe something wrong in the activity.

- The agent that launches this activity is not working, I mean it doesn't create the case work (see image 5 about this agent)

Thank you very much because of your help

***Edited by Moderator Marissa to update platform capability tags; update SR details****

Group Tags

Correct Answer
December 23, 2018 - 7:02am

Hi @HectorSMG,

while "call" the activities make sure you pass the page in 'Step page' column. Additionally, after calling createWorkPage and before AddWork you may set some properties of the newly created work object. In your case the crucial property to set is the pyFlowName - it would be the name of starting process - most likely "pyStartCase". Without this setting the case processing would not actually start and thus the steps defined in Case life cycle not executed.
To set this property, you may use Property-Set or even easier way is to fill in the parameters of "Call createWorkPage" (see pyFlowName.png):
- "workPage" - name of the page created (here: page)
- "FlowType" - starting flow of work object (here: pyStartCase)
 

Additionally, on my local env I found the pzInsKey remains unchanged (and causes error) between the Run of the CreateRPAExample activity. To resolve this issue I added Page-Remove step to the activity (see page-remove.png):

I attach also:
- CreateRPAExample Pages&Classes (pages-classes.png) and Security (security.png) tabs,
- Agent Schedule (agent-schedule.png) and Security (agent-security.png) tabs

With the above configuration tasks are assigned to robot with both: Run (run activity manually) and Agent (see: robot-manager.png)

Hope that helps.

Regards,

Maciek

Comments

Keep up to date on this post and subscribe to comments

December 5, 2018 - 8:28am

When you trace the agent, do you see it pick up your queue item and run the activity? Are there any errors?

December 7, 2018 - 10:39am

Hi,

There is an error when agent executes; I have extracted from /prsysmgmt:

Some days ago this error didn't exist. I attach the whole content in textfile.

Thanks,

December 7, 2018 - 10:56am

The error is showing there isn't enough space.

Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "base/16386/29530.3": No space left on device

December 7, 2018 - 12:10pm

Yes, I agree with you but we should take into account that this error is new and it has nothing to do with my problem with the agent. When I resolve this space problem I will try to trace the agent execution and I will tell you.

Thanks,

December 15, 2018 - 11:44am

Hi,

I have got opened a ticket SR-C79700 for this if you wanted to contribute to the solution.

Thanks

December 21, 2018 - 9:04am

Hi,

We have managed to run the activity (from agent and manually as well) that creates the case work successfully. If I create the case work manually the assignment to the robot is correct and in an unattended way, but when it is the activity who creates the case work the assignment to the robot doesn't work.

I highlight that the case type has got only one step of type "Robot Assign".

We have extracted the following error from log:

ERROR   - Agent [Robotics] activity [BBHDL-Robotics-Work-TestGestionDelTalento.CreateTestGestionDelTalento] queue number [0] terminated manually ErrorMsg: Terminated manually 

Any idea? I have still got the ticket open.

Thanks,

December 23, 2018 - 7:02am

Hi @HectorSMG,

while "call" the activities make sure you pass the page in 'Step page' column. Additionally, after calling createWorkPage and before AddWork you may set some properties of the newly created work object. In your case the crucial property to set is the pyFlowName - it would be the name of starting process - most likely "pyStartCase". Without this setting the case processing would not actually start and thus the steps defined in Case life cycle not executed.
To set this property, you may use Property-Set or even easier way is to fill in the parameters of "Call createWorkPage" (see pyFlowName.png):
- "workPage" - name of the page created (here: page)
- "FlowType" - starting flow of work object (here: pyStartCase)
 

Additionally, on my local env I found the pzInsKey remains unchanged (and causes error) between the Run of the CreateRPAExample activity. To resolve this issue I added Page-Remove step to the activity (see page-remove.png):

I attach also:
- CreateRPAExample Pages&Classes (pages-classes.png) and Security (security.png) tabs,
- Agent Schedule (agent-schedule.png) and Security (agent-security.png) tabs

With the above configuration tasks are assigned to robot with both: Run (run activity manually) and Agent (see: robot-manager.png)

Hope that helps.

Regards,

Maciek

December 24, 2018 - 7:15am

Yeah, It works!!

Thank you very much