Question
BNY Mellon
IN
Last activity: 4 Oct 2018 13:54 EDT
Creating case through Service
I want to create a Case through service. When a case creation request comes through service, in the Service acitivty I am calling the createWorkProcess activity by passing the pyStartCase as the parameter for flow name. Before calling this activity I am creating the pyWorkPage using Page-New method & populating it with required values. This way the case is getting created correctly. But the default WorkParties which will get created if the case is created directly through portal, is not getting created when requested through service. Does anyone have this/similar scenario and faced this issue? Am I missing anything? Is the way I am implementing this is correct?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
BNY Mellon
IN
The pxRequestor page was blank when the case creation request comes through service. So the workparty creation was getting failed. Now we are passing the Create Operator ID through service. With that we are manually setting the pxRequestor.pxUserIdentifier & pxRequestor.pyUserIdentifier properties before calling the createWorkPage activity which creates the work parties. This solved our issue. Hope it works for you.
Pegasystems Inc.
US
You could look at the svcAddWorkObject activity and see if that helps you. In that activity, createWorkPage is called to set up the data for the work object. There is WorkPartiesRule parameter you can specify when calling createWorkPage.
Pegasystems Inc.
IN
I used createWorkPage (provided pyStartCase as FlowType) and AddWork. It worked fine.
BNY Mellon
IN
I tried this way as well. But when the PartyNewSetup activity runs, it checks for pxRequestor.pxUserIdentifier != "" before creating the workparty. When the case creating request comes through service, that condition fails as the pxUserIdentifier property is empty. If the same user directly creates the case from the portal, the same activity runs and the condition is getting passed as the pxUserIdentifier is having a value that time. I could not find why the pxUserIdentifier property is empty only if the request comes through service and not when the case is created directly through portal.
Note: The request for this service also comes from a Pega application. The same user has access for both applications.
Pegasystems Inc.
IN
Did you tried the way Carissaw suggested, that will work for creating workobject through services. while creating from portal the activity will get current requestor context so the pxRequestor page is loaded with data but while from service it will initialize a service requestor from that context it will execute the activity
TATA Consultancy Services Ltd
US
Did u get any solution for this. I am also looking to sort this out
Accepted Solution
BNY Mellon
IN
The pxRequestor page was blank when the case creation request comes through service. So the workparty creation was getting failed. Now we are passing the Create Operator ID through service. With that we are manually setting the pxRequestor.pxUserIdentifier & pxRequestor.pyUserIdentifier properties before calling the createWorkPage activity which creates the work parties. This solved our issue. Hope it works for you.
Aaseya IT Services Pvt Ltd
KW
Hi Venkatesh,
AM working on something similar. For me the Work objects are not getting created when wsdl hit from soap ui. While from studio its working perfectly fine
Thanks
Sanal
-
Hemanth Guptha Pasupula Subba
Aaseya IT Services Pvt Ltd
KW
Hey I figured it out. We can trace the hit even if its from outside pega. The Work Party was not getting created for me properly.
Thanks
Sanal