cancel
Showing results for 
Search instead for 
Did you mean: 

Content Status aspect and Simple workflow

sbsrulz
Champ in-the-making
Champ in-the-making
Hey guys! I need some assistance…

I have simple workflows enabled on different spaces with Accept/Reject scenario that moves the contents to their respective spaces. So in my scenario, there is only one 'Rejected' space that accepts contents from various other spaces when 'Reject button' is clicked. I want to keep track of the content status i.e. the space from which it got rejected and the reason.

I added a custom aspect and I can update the status using Javascript but the problem is that I don't know how to keep track of the original folder from which the content was moved. Any ideas?

Plus is there any way using JavaScript to check whether 'Accept' or 'Reject' button in Simple workflow was clicked so that I could work on the scripts accordingly?
1 REPLY 1

cheffilet
Champ in-the-making
Champ in-the-making
If you starting a workflow, based on a space, you obtained the current space id via navigator. Store this as variable into the processinstance. When you approve the worklfow(or reject) you have the already set variable in place.

Outcomes of transition being taked are available on task-leave events. After that, over workflowservice can those tasks retrieved and checked for this value(e.g. outcome="approved"). But if you have 2 tasks, the second task does not remember which decision being taked (if you have no delegation right there). Therefore you should store the outcome into the processinstance, using TaskController or via processdefinition "write, read" variables.

Once being set, you obtain the property via javascript as this is a normal property being transmitted to the next task(must be set on the second task as "readable").