Question
Bits in Glass
IN
Last activity: 24 Apr 2018 13:16 EDT
Pega 7.1.9 - How to create case with case id in format Case-DDMMYY-1?
Consider I have a case type Candidate. Whenever I create a case, the case id should be like CAN-DDMMYYYY-N where N is the sequence number.
Thank You!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
LTI Mindtree
IN
Hi Rakesh,
We have few ways to customize Work Id Prefix:
1. Generally if we open the application rule, under cases and data tab, you can find the work Id prefix for each and every case of the application;
2. We can customize the work Id prefix value .pyWorkIDPrefix in the pyDefault data transform of the case.
3. We can also set the values by setting Work-.pyID value .Work-.GenerateID activity checks for this .pyID value if it is not present uses Default W- value.
In your case 1st and 2nd ways are suitable to set prefix. Please find attachment.
NOTE: To set the prefix value using Data Transform, in application definition, Work ID prefix must be blank under cases and data tab as shown in the attachment which I highlighted
Hi Rakesh,
We have few ways to customize Work Id Prefix:
1. Generally if we open the application rule, under cases and data tab, you can find the work Id prefix for each and every case of the application;
2. We can customize the work Id prefix value .pyWorkIDPrefix in the pyDefault data transform of the case.
3. We can also set the values by setting Work-.pyID value .Work-.GenerateID activity checks for this .pyID value if it is not present uses Default W- value.
In your case 1st and 2nd ways are suitable to set prefix. Please find attachment.
NOTE: To set the prefix value using Data Transform, in application definition, Work ID prefix must be blank under cases and data tab as shown in the attachment which I highlighted
Thanks
Pegasystems Inc.
IN
Hi Rakesh,
pyworkidprefix is the property which is used to populate the prefix of the work object.
Labb Consulting
NL
Hi Rakesh,
The property "pyWorkIDPrefix" holds the value for Case ID prefix.
This property is set using a java method just before creation of work object, in the pega default activity, "AddWork" of Work- class. This java method takes the value from the application rule.
In order to override the value, just add your step after the java step.
Steps:
1) Set the value of DDMMYY in a param.Date
2) Set the value of pyWorkIDPrefix to the Value "CAN-"+Param.Date+"-"
Please note that AddWork is a final rule so suggestion would be to rename the activity and bring it to your desired layer if required.
Regards,
Shweta
Accepted Solution
LTI Mindtree
IN
Hi Rakesh,
We have few ways to customize Work Id Prefix:
1. Generally if we open the application rule, under cases and data tab, you can find the work Id prefix for each and every case of the application;
2. We can customize the work Id prefix value .pyWorkIDPrefix in the pyDefault data transform of the case.
3. We can also set the values by setting Work-.pyID value .Work-.GenerateID activity checks for this .pyID value if it is not present uses Default W- value.
In your case 1st and 2nd ways are suitable to set prefix. Please find attachment.
NOTE: To set the prefix value using Data Transform, in application definition, Work ID prefix must be blank under cases and data tab as shown in the attachment which I highlighted
Hi Rakesh,
We have few ways to customize Work Id Prefix:
1. Generally if we open the application rule, under cases and data tab, you can find the work Id prefix for each and every case of the application;
2. We can customize the work Id prefix value .pyWorkIDPrefix in the pyDefault data transform of the case.
3. We can also set the values by setting Work-.pyID value .Work-.GenerateID activity checks for this .pyID value if it is not present uses Default W- value.
In your case 1st and 2nd ways are suitable to set prefix. Please find attachment.
NOTE: To set the prefix value using Data Transform, in application definition, Work ID prefix must be blank under cases and data tab as shown in the attachment which I highlighted
Thanks
-
Prateek Patnaik
Bits in Glass
IN
Hello Chaitanya,
In the second approach, I set the pyWorkIDPrefix as you said, but still its not working. I cant see this value getting set. Do I need to perform any task to get this called?
LTI Mindtree
IN
Bits in Glass
IN