cancel
Showing results for 
Search instead for 
Did you mean: 

Correct workflow name

irene08
Champ in-the-making
Champ in-the-making
Hi! Good Day!

Do you know the right workflow name of 'Parallel Review Workflow' and 'Parallel Group Review Workflow' or do you know how to call this? I will execute a javascript and I'm having a hard time in knowing the right workflow name to call. Thank you so much for your help.

/*IRENE-Tagging file from reviewed to approval*/
     <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
          if (workflowname = activiti$activitiparallelreview || workflowname = activiti$activitiparallelgroupreview)
                if (wf_requiredApprovePercent = 100 && wf_actualPercent = 100)
            {
             logger.log(“Irene…Reading the if statement”);
             cm:generalclassifiable=”Approval”;
             logger.log(“enabling the approval”);
            }
             if (wf_requiredApprovePercent == wf_actualPercent)
            {
             logger.log(“Irene…Reading the 2nd if statement”);
             cm:generalclassifiable=”Approval”;
                                 logger.log(“enabling the approval.. 2nd if statement”);
                                }
          </activiti:string>
                  </activiti:field>
    </activiti:taskListener>
/*IRENE*/

Thank you again.
Irene Smiley Happy
4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

the names are "activitiParallelReview" and "activitiParallelGroupReview" - the prefix "activiti$" is only required when working with Alfresco services or data structures that are not specific to either workflow engine.

But a simple question: Why do you need to distinguish between workflows in a task listener? Usually, the task listener is part of the workflow process definition of a specific workflow and thus you already know which workflow is being executed.

Regards
Axel

irene08
Champ in-the-making
Champ in-the-making
Hi!

Your reply is very much appreciated. I'm thankful that somehow you understand my scenario.

Answer to your question..

At first, that code was added in the workflow xml file. But I received errors and deleted all my users even admin. So I decided to separate that script using "Execute script" and change the file to javascript. But I'm not sure with my codes. I don't know how to start the scripting so I just copy that part then save it as javascript. If you could help in this, thank you very much.

Irene Smiley Happy

rubiecasana
Champ in-the-making
Champ in-the-making
Hi Axel,

I tried to modify the default parallelgroupreview of Alfresco and I want to undeploy it and deploy it again so that the changes that I made will take effect. However, in the workflow console, I execute the undeploy command:
undeploy definition activitiParallelGroupReview

and it returns this error:
org.alfresco.service.cmr.workflow.WorkflowException: 09100179 Invalid Global Id 'activitiParallelGroupReview'

Thanks,
Rubie

Hello,

the names are "activitiParallelReview" and "activitiParallelGroupReview" - the prefix "activiti$" is only required when working with Alfresco services or data structures that are not specific to either workflow engine.

But a simple question: Why do you need to distinguish between workflows in a task listener? Usually, the task listener is part of the workflow process definition of a specific workflow and thus you already know which workflow is being executed.

Regards
Axel

afaust
Legendary Innovator
Legendary Innovator
Hello,

the workflow console can not be used for Activiti workflows. It only works for JBPM processes. Use the activiti-admin UI included in the Alfresco Web Client application (/alfresco/activiti-admin).

Regards
Axel