Expand my Community achievements bar.

SOLVED

User Assignment in Custom Workflows

Avatar

Former Community Member

Hi,

    i created custom workflow and assigned newly created user to work Item.During testing I am getting Exception in logs states that 

com.adobe.granite.workflow.WorkflowException: Cannot add WorkItem to nobody's inbox at com.adobe.granite.workflow.core.jcr.WorkItemManager.addWorkItem(WorkItemManager.java:125) at com.adobe.granite.workflow.core.jcr.WorkItemManager.addWorkItem(WorkItemManager.java:98) at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:133) at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:365) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: javax.jcr.ItemExistsException: node2_etc_workflow_instances_2015-08-11_model_106121726446863

It is not properly assigned to the user.Verified under respective user inbox.

I created user under workflow-users group which will be the built-in group of AEM having access to create/modify/delete under workflow folder.Please guide me how to proceed with this.

About Work Item: I created project Task component under workflow and assigned to new user.

 

Thanks!

 

 

Kirithi

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Which step is failing?  The "project task" step only works if the worklfow was started from a project and has some metadata setup in the workflow to direct it to the project.

Will

View solution in original post

9 Replies

Avatar

Level 10

Hi,

can you make sure the user has the ACLs for the notifications

Avatar

Correct answer by
Employee

Hi,

Which step is failing?  The "project task" step only works if the worklfow was started from a project and has some metadata setup in the workflow to direct it to the project.

Will

Avatar

Level 10

what CQ version are you using. Can you also paste a pic of your workflow model. 

Avatar

Former Community Member

Hi,

    I am using CQ-6.0.0 version.

    [img]PrjtTaskStep.JPG[/img]  ; [img]WorkflowSteps.JPG[/img]

    Under ACL for the newly created group under new user it is having jcr:read privilege.

    

   Thanks!

 

  Kirithi

Avatar

Former Community Member

Thanks Will. I have modified project task step to participant step.

Avatar

Level 2

Hi,

Try providing read/write/modify/delete permissions to /etc/workflow/instances folder. It should work.

Thanks!

Avatar

Level 10

Hi, give write privilage aswell and try

Avatar

Former Community Member

Hi,

    I tried giving above permissions but it is not working.I am using Project Task Component in my model.

    Is it correct to use the component in the model for taking decisions? Based on task action I am deciding next steps.

   Thanks!

 

  Kirithi

Avatar

Level 2

Try Goto Step for switching tasks. Write a simple ECMA scripts to have the checks. Sample ECMA script for reference

function check() { var path = workflowData.getPayload().toString() + "/jcr:content/workflowdata"; var node = jcrSession.getItem(path); var reviewvalue = ""; if (node.hasProperty("review")) { reviewvalue = node.getProperty("review").getString(); } var expectedString ="/home/groups/project/group_reviewers"; if (reviewvalue.indexOf(expectedString) == 0){ return false; } else { return true; } }