cancel
Showing results for 
Search instead for 
Did you mean: 

advanced workflow

areuexperienced
Champ in-the-making
Champ in-the-making
hi
excuse me for the stupid question but i'm a newbie
i have a problem with advanced workflow

1 why after the deplyment i cannot see my advanced workfow on alfresco rules?
2 where i can find physically on the tomcat installation all the xml workflow definition?


i read the wiki tutorial but in my opinion there are some dark zones from one step to onother.


thanks

D
10 REPLIES 10

peds
Champ in-the-making
Champ in-the-making
I don't think there is a rule to start an advanced workflow, but here's a little script I wrote to automatically run advanced workflows:
function startWorkflow(numDays) {
   
    var workflow = actions.create("start-workflow");
    workflow.parameters.workflowName = "jbpm$mywf:workflowname";
    workflow.parameters["bpm:workflowDescription"] = "here's a description";
    workflow.parameters["bpm:groupAssignee"] = "GROUP_workerbees";
    // this is just if you want a due date. you only need to set the parameters you want to.
    var futureDate = new Date();
    futureDate.setDate(futureDate.getDate() + numDays);
    workflow.parameters["bpm:workflowDueDate"] = futureDate;
    workflow.execute(document);
   
}

You can make a rule to run this script on incoming content, and it should work.

Hope this helps,
Ben

bucklao
Champ in-the-making
Champ in-the-making
All the sample Workflow processdefinition.xml files are in this location:

alfresco/WEB-INF/classes/alfresco/workflow

When you're ready to deploy your own Workflow place them into this directory:

alfresco/WEB-INF/classes/alfresco/extension

Hopefully this answers your question.

BuckLao-

vinaxwater
Champ in-the-making
Champ in-the-making
u must add files xml model + process + message in "bootstrap-context.xml" and have user interface for task in web-client-config-properties.xml. all files in WEB-INF/classese/alfresco.

aswini
Champ in-the-making
Champ in-the-making
Hi peds,

Can you please explain how can I use your script for starting the advanced workflow (Review and Approve) automatically, so that any file uploaded in a folder starts a workflow Review and Approve without user intervention.

Thanks and urgent please.

santoso_n
Champ in-the-making
Champ in-the-making
Hi,


> 1 why after the deplyment i cannot see my advanced workfow on alfresco rules?
possibly your workflow isn't deployed correctly

> 2 where i can find physically on the tomcat installation all the xml workflow definition?
Did you mean the default workflow? You can find it in tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow

maybe these posts might be a help for you on developing your workflow;
- Custom workflow in alfresco (http://livinginjava.blogspot.com/2008/10/custom-workflow-in-alfresco.html)
- Starting an alfresco workflow using Javascript API (http://livinginjava.blogspot.com/2008/10/starting-alfresco-workflow-using.html)


santoso

robain
Champ in-the-making
Champ in-the-making
Anyone has any idea how to automatically start a workflow on a document as and when it is created or updated. i am trying to do this with webscripts but without much success. however keeping creation of content  and workflow webscripts seperate works just fine. I just want to have a way to start workflow automatically on some contents. any help is much appreciated.


     //…uploaded file is created. then i try to start the workflow.
     upload.save();
     
      var resultString = "";
     
     
      var workflowNodeId = upload.id;
      if ((workflowNodeId != "") && (workflowNodeId != null) )
      {
         var workflowNode = search.findNode("workspace://SpacesStore/" + workflowNodeId);
      
         if (workflowNode != null)
         {
            try
            {
            var wflow = actions.create("start-workflow");
            wflow.parameters.workflowName
                   = "jbpm$matriawf:customReviewWorkflow";
            wflow.execute(workflowNode);
            resultString = "Workflow Started!";
            }
            catch (e)
            {
               resultString = "Failed to start workflow"+e;
            }
         }
      }

i get this error while trying to get the version history at the start of the workflow. any ideas.
net.sf.acegisecurity.BadCredentialsException: Bad credentials presented

thanks.

lakshya
Champ in-the-making
Champ in-the-making
Hello,
I have used the script to start an advanced workflow
function startWorkflow(noderef) {
  
    var workflow = actions.create("start-workflow");
    workflow.parameters.workflowName = "jbpm$wf:reviewTask";
    workflow.parameters["bpm:workflowDescription"] = "here's a description";
    workflow.parameters["bpm:groupAssignee"] = person.properties.userName;
    workflow.execute(noderef);  
}

But I am getting error :
TypeError: Cannot set property "workflowName" of undefined to "jbpm$wf:reviewTask"

From where I can get the proper workflowName. I want to run Advanced workflow (approve/reject) already provided by Alfresco through script.


Please give the solution…..

santoso_n
Champ in-the-making
Champ in-the-making
Hi,

Regarding workflows available on your alfresco, you could try the steps below:
1. Log in as admin
2. Open this page :
    http://<host>:<port>/alfresco/faces/jsp/admin/workflow-console.jsp
3. On the command textfield, type in show definitions all
    Alfresco will list down workflows available and the names which you can use.

You could also take a look at http://wiki.alfresco.com/wiki/Workflow_Console for more detail information.


santoso

lakshya
Champ in-the-making
Champ in-the-making
Thanks a lot santoso……
It worked Smiley Happy