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
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
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
- Task-driven and schedule-driven Agents
- Pls help to know about agent types which are schedule driven and task driven?
- conditionally start parent agent (Allocator Advanced agent) only after all the allocated sub agents(standard agents) complete of their tasks using queue for agent method or activity in pega
- Robot fails to launch by executing a batch file in a scheduled task
- conditionally control execution of parent agent only after all the allocated sub agents using queue for agent method or activity complete of their tasks in pega