Hi Everyone,
I'm trying to build a Automated waterfall via script that will take out the activity name and count of each and every task executed and push it to my array. After digging long time in workflow schema i found a element called visual state, which stores the activity name and count for that activity as XML logs when workflow gets executed.
I thought to make use of this logs and create a script which will extract activity name and activity count from XML logs and store it in my JSON object.
I achieved doing it flawlessly, but the issue is if i modify the activity name in the workflow, only partial text is considered and the remaining text is truncated, can i understand why this is happening?
Example for my scenario:
Query condition given: "Query: email does not start with 'D' and primary key is not empty and mobile is not empty"
If i copy paste the same condition in my activity name: "Query: email does not start with 'D' and primary key is not empt"
Only partial text is showing remaining got truncated and if i check the max length accepted by a activity name - it is "64"
If i can able to store any length of text or condition in my activity name, I can store the same in visual state attribute in workflow schema.
Below is the screenshot:
Is there any method that can be used to increase the length of my activity name?
Also, please confirm if I make changes to the activity name that anything will be affected on the backend or not.
Thanks in advance.
Regards
Sujith Kumar
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
By default the character limit of 'activity name' is 64. To increase it, say to make character limit as 100, Extend xtk:workflow schema.
(Create a new schema > select 'extension of a schema' > schema:xtk:workflow )
Add the below script in it,
<element label="Activity name" length="100" name="activityName" type="string"/>
Save it, Update the database structure, disconnect & reconnect.
This will increase the character limit to 100.
<srcSchema created="2023-07-31 03:43:02.957Z" desc="Workflows definitions" extendedSchema="xtk:workflow" img="xtk:workflow.png" label="Workflows" labelSingular="Workflow" lastModified="2023-07-31 03:43:02.957Z" mappingType="sql" name="workflow" namespace="abcd" xtkschema="xtk:srcSchema">
<createdBy _cs="Partha"/>
<modifiedBy _cs="Partha"/>
<element label="Activity name" length="100" name="activityName" type="string"/>
<element desc="Workflows definitions" img="xtk:workflow.png" label="Workflows" labelSingular="Workflow" name="workflow"/>
</srcSchema>
Hi @ParthaSarathy ,
Thanks for your reply, but if I extend the schema using the element, I'm getting below error while saving or when I try to preview the xml
Error I'm getting when I save:
Unable to find XPath element 'activity' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activity' directive in the 'crm:workflow' schema.
Unable to find XPath element 'workflowState' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:workflowState' directive in the 'nms:workflow' schema.
Unable to find XPath element 'activityName' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activityName' directive in the 'xtk:workflowEvent' schema.
Unable to find XPath element 'affinity' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:affinity' directive in the 'xtk:workflowJob' schema.
Unable to find XPath element 'activityName' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activityName' directive in the 'xtk:workflowLog' schema.
Unable to find XPath element 'hostname' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:hostname' directive in the 'xtk:workflowTask' schema.
------
Please help with the above error
Regards
Sujith Kumar
Views
Replies
Total Likes
in the same extended schema, change the previous script as below, update database structure.
<srcSchema created="2023-07-31 03:43:02.957Z" desc="Workflows definitions" extendedSchema="xtk:workflow" img="xtk:workflow.png" label="Workflows" labelSingular="Workflow" lastModified="2023-07-31 03:43:02.957Z" mappingType="sql" name="workflow" namespace="abcd" xtkschema="xtk:srcSchema">
<createdBy _cs="Partha"/>
<modifiedBy _cs="Partha"/>
<element name="activity">
<attribute dataPolicy="identifier" default="ColName()" label="Name" length="100"
name="name" type="string"/>
</element>
<element name="start">
<attribute dataPolicy="identifier" default="ColName()" label="Name" length="100"
name="name" type="string"/>
</element>
<element desc="Workflows definitions" img="xtk:workflow.png" label="Workflows" labelSingular="Workflow" name="workflow"/>
</srcSchema>
Update database structure > disconnect - reconnect
Create a new workflow, and create a new 'Start' activity, and check you're able to enter name for it with the length more that 64 and less that 100 characters.
This will work for start activity! Let me know if it worked for you in your instance.
Hi @ParthaSarathy ,
Thanks for your reply. Following your script I was able to enter more than 64 char length in to my activity name tab
But if I run a simple query like primary key is not empty by querying recipient database, I'm getting below error in journal section,
08/02/2023 7:09:15 PM Workflow restarted (operator 'Internal account')
08/02/2023 7:09:15 PM Workflow 'WKF1' is being run
08/02/2023 7:09:15 PM No activity with name 'Query__email_is_not_empty_and_email_contains_____and_gender_equa'
08/02/2023 7:09:15 PM Activity 'Query__email_is_not_empty_and_email_contains_____and_gender_equal_to_Female_or_gender_equal_to_Male': Transition 'result': The target activity is not specified
08/02/2023 7:08:03 PM Workflow restarted (operator 'Internal account')
08/02/2023 7:08:03 PM Workflow 'WKF1' is being run
08/02/2023 7:08:03 PM No activity with name 'query'
08/02/2023 7:08:03 PM Activity 'Query__email_is_not_empty_and_email_contains_____and_gender_equal_to_Female_or_gender_equal_to_Male': Transition 'result': The target activity is not specified
I think so it is considering the long text as my activity name and its trying to query the data i need, as there where no activity name with long text it was throwing me error in journal section. Am I right?
How can I solve this issue?
Regards,
Sujith.
Views
Replies
Total Likes
@Sujith_02kumar , Clear local cache, try the same by creating a new workflow and test the same.
Views
Replies
Total Likes
Hi @ParthaSarathy ,
Tried clearing cache, Still getting same error,
08/03/2023 12:49:56 AM Activity 'Query__primary_key_is_not_empty_and_email_starts_with__a__and_first_name_starts_with__w_': Transition 'result': The target activity is not specified
08/03/2023 12:47:01 AM Workflow restarted (operator 'Internal account')
08/03/2023 12:47:01 AM Workflow 'WKF1' is being run
08/03/2023 12:47:01 AM No activity with name 'query'
In start activity I'm not getting any error, only in query activity, I'm having this issue.
Please help with this query,
Regards,
Sujith.
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
In addition to @ParthaSarathy 's approach, Please modify your code..
Please modify your code after you extend the Data base schema as shown in below screenshot:
After saving this, Please update your Database Structure and check whether you are able to insert 100 characters in Workflow Label.
Regards,
Pravallika.
Views
Replies
Total Likes
Hi @LakshmiPravallika ,
If I do it, I'm getting below error,
Unable to find XPath element 'activity' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activity' directive in the 'crm:workflow' schema.
Unable to find XPath element 'workflowState' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:workflowState' directive in the 'nms:workflow' schema.
Unable to find XPath element 'activityName' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activityName' directive in the 'xtk:workflowEvent' schema.
Unable to find XPath element 'affinity' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:affinity' directive in the 'xtk:workflowJob' schema.
Unable to find XPath element 'activityName' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:activityName' directive in the 'xtk:workflowLog' schema.
Unable to find XPath element 'hostname' in schema 'xtk:workflow'.
GEN-300014 Error while processing the template='xtk:workflow:hostname' directive in the 'xtk:workflowTask' schema.
------
Please tell me how can I fix this?
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
In the Screenshot of Code you have pasted, I see no changes done to the code.
Please make the changes instead of element tag liner in your code, please paste the below code and check, it will work (replace the element tag code entire line with the below)
Regards,
Pravallika
Views
Replies
Total Likes
Hi @LakshmiPravallika ,
Thanks for your reply, I did as you mentioned above and updated the structure, but I'm not able to enter long text in activity name.
It is accepting only 64 char and remaining characters got truncated,
Here is the screenshot,
In activity name box, it is accepted max char length of 64 char only.
In my activity name box, I should be able to enter long text which is more than 64 char long. Can I able to do it?
Please help me with this query.
Regards,
Sujith
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
I have looked into the errors coming, It Looks like the other extended schemas of "xtk:Workflow" are having few issues and that's the reason why you are not able to create one more extended Schema for "xtk:workflow".
Are you able to view the Data in the other extended Workflow Schemas like crm:workflow, nms:workflow,xtk:workflowEvent,xtk:workflowJob,xtk:workflow as said in error Comments for the said Columns?
Can you Please raise a ticket with Adobe Team as these are out of the Box Schemas which you are facing the errors in?
Regards,
Pravallika.
Views
Replies
Total Likes
Hi @LakshmiPravallika ,
I was able to solve that issue, that issue was coming with my instance only.
I did as you mentioned above and updated the structure, but I'm not able to enter long text in activity name.
It is accepting only 64 char and remaining characters got truncated,
Here is the screenshot,
In activity name box, it is accepting max char length of 64 only.
In my activity name box, I should be able to enter long text which is more than 64 char long. Can I able to do it?
Please help me with this query.
Regards,
Sujith.
Views
Replies
Total Likes
Please can someone help me with this?
Thanks in advance.
Regards,
Sujith.
Views
Replies
Total Likes
Views
Likes
Replies