cancel
Showing results for 
Search instead for 
Did you mean: 

Activation,deactivation, enabling & disabling of workflows

muralidharand
Star Contributor
Star Contributor
Hi experts,

Does Alfresco - activiti supports Activation,deactivation,disabling and enabling of workflow in alfresco 4 enterpise edition ?

Activate : Once the workflow is activated by admin user, then only the user can start the workflow.

Deactivate : Once the workflow is deactivated, then running workflow should stop and user can't start the new workflow.

Disable : Once the workflow is disabled, then running workflow will continue and user can't start the new workflow.

Enable: If the disabled workflow is enabled, then the user can start the new workflow.

If it is supported then help /suggest  me , how I can achieve this?
3 REPLIES 3

angello0571
Champ on-the-rise
Champ on-the-rise
Hi!

I'm not exactly sure about the behaivor that you want, but there is a console in alfresco manager to deploy and undeploy workflows, install new version, check workflow's instance, etc.

Open a web browser and give this URL:

http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp

if you type this command: show workflows all

You'll get the current instances of your workflows.

If you type: show definitions all

You'll get the current workflows definitions.

You can addremove a new definitions, create/delete instances, etc …

Look this tutorial for Activiti created by Jeff Potts, I'm sure this is a great entry point to the basics:

http://ecmarchitect.com/images/articles/alfresco-workflow/advanced-workflow-article-2ed.pdf

Good Luck

muralidharand
Star Contributor
Star Contributor
I'm looking the behaviors of enable,disable,activation and deactivation of workflows.

vangnd1
Champ in-the-making
Champ in-the-making
Hi Muralidharand !

I have received message from a alfresco's member :

I'm afraid it will need a lot of work .
Activiti dose support suspend process definitions and suspend the process instance ,but alfresco activiti wrapper dose not.
So to implement your requirment in share,you should extend alfresco from service level ,to webscript level,and to share UI level:
1.In java service level ,extend existing workflowService ,add suspendProcessInstance and suspendProcessDefinition method,also extend WorkflowDefinition and WorkflowInstance class and add suspend status.
2. In Webscript level,extend webscrtip such as (workflow-definition.get, workflow-instance.get , workflow-definition.putt, workflow-instance.put) to get workflow definition/instance suspend status and to update suspend status.
3.In share UI level ,display workflow definition/instance suspend status and add actions to update workflow definition/instance suspend status.

After that I tried to implemented it but I found easy way to disable/enable workflow .
on alfresco's source code package org.activiti.engine.impl class RepositoryServiceImpl have a method
- public void suspendProcessDefinitionById
- public void activateProcessDefinitionById

You can custom and change to using those methods through api/workflow-definitions



This is my personal opinion,maybe there is an easy way which I don't know.