Manually Created Case's Activity Is Missing in Activity_Definition
Question
Service Studio Version
11.11.8 (Build 45664)

I have a CMf app generated with Workflow Builder and I'm trying to extend it with a subcase.

I generated an app for the subcase using Workflow Builder, and copied parts of the generated app (configurations, entities, screens ...etc.) to my parent case app. 

My issue is that the user cannot take action on the subcase because this query returns nothing:

When I query Activity_Definition, I don't find a definition with an SSKey matching the one I provided in ConsultationActivityDefinition (the subcase activity definition).

The Activity created for my subcase has a different SSKey.

I guess Workflow Builder is doing something behind the scenes to add the activity definition in Activity_Definition. Perhaps it inserts it there, gets the SSKey then stores it in the case activity definition static entity?

Can I achieve the same thing when I'm creating a case manually?

I appreciate any guidance on how to get my activity's definition to register with Activity_Definition.

Also, is this going to be an issue when I move the app to another environment? Do I need insert any records in Activity_Definition myself?


Thanks

I think it's worth mentioning that I have another process with same label as my subcase's, which has an activity of the same label as well.

I don't know if this could be the reason why a new definition in Activity_Definition was not created. 

I've seen a similar issue where I have two processes from two different CMf apps with identical process and activity labels, in one app an activity definition's IsActive was false. Debugging the second app, I saw that the activities that were created had the SSKey of the disabled activity definition from the first app. I changed the SSKey in my second app and the issue was fixed (although both apps had different SSKey for the activity from the beginning).

Do process lable + activity label have to be unique within an environment?


I resolved the issue in my first post by Querying Activity_Definition by ActivityId, getting the SSKey and then pasting it in my subcase activity definition (ConsultationActivityDefinition). However, I don't think this is the way to go. I can't do this every time I deploy the app.

Any suggestions?


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.