start custom workflow using action execute script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2013 07:35 AM
Hi, i am new to alfresco
I want to create a rule, with the "execute a script" actions. I want to start the advanced workflow with the help of the rules.
i have created workflow using activiti and in alfresco share by default in rules execute script is showing only start pooled review and approve workflow .
how can i display my custom workflow ?
how i can create my custom action ?
where i should create javascript to perform an action so that document i attach to workflow get copied/moved to 'approved' folder i created in user homes/himanshu/approved
Thank You
Himanshu Kapoor
Dell International Services
I want to create a rule, with the "execute a script" actions. I want to start the advanced workflow with the help of the rules.
i have created workflow using activiti and in alfresco share by default in rules execute script is showing only start pooled review and approve workflow .
how can i display my custom workflow ?
how i can create my custom action ?
where i should create javascript to perform an action so that document i attach to workflow get copied/moved to 'approved' folder i created in user homes/himanshu/approved
Thank You
Himanshu Kapoor
Dell International Services
Labels:
- Labels:
-
Archive
17 REPLIES 17
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2013 10:43 AM
No Koopa, AFAIK there is nothing you could do about it.
I have also come across this issues once but could not find anything which helps.
Also if you customize the UI to fetch the scripts from class path you need to do it for explorer and share seperatly
I have also come across this issues once but could not find anything which helps.
Also if you customize the UI to fetch the scripts from class path you need to do it for explorer and share seperatly
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2013 06:25 AM
hi All
thank you for your reply….
i have created trigerMyWorkflow.js
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$dm:marketReview";
workflow.parameters["bpm:workflowDescription"] = "Please review " + document.name;
workflow.parameters["bpm:assignee"] = "admin";
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document);
and placed in company home->data dictionary->Scripts
but it is showing err..
ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03230089 Failed to execute script 'workspace://SpacesStore/a354a191-bf06-45fa-a6be-de944df45179': null
Caused by: java.lang.NullPointerException
my workflow is working in share.
thank you for your reply….
i have created trigerMyWorkflow.js
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$dm:marketReview";
workflow.parameters["bpm:workflowDescription"] = "Please review " + document.name;
workflow.parameters["bpm:assignee"] = "admin";
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document);
and placed in company home->data dictionary->Scripts
but it is showing err..
ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03230089 Failed to execute script 'workspace://SpacesStore/a354a191-bf06-45fa-a6be-de944df45179': null
Caused by: java.lang.NullPointerException
my workflow is working in share.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2013 08:07 AM
Could be that document is null. I'm already facing the same issue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2013 10:09 AM
Yes, document object will only be available if you are invoking script on rule based on document related events like incoming of document,update of document etc… otherwise you will get it null in the context.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2013 12:52 AM
hi
I have applied above rule to folder and while trying to upload any doc its giving 'null'.
still problem not resolved.
I have applied above rule to folder and while trying to upload any doc its giving 'null'.
still problem not resolved.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2013 07:58 AM
HI guys
sry i was doing one mistake , in my share-workflow-form-config file i have written
<config evaluator="string-compare" condition="activiti$marketReview">
and was using
workflow.parameters.workflowName = "activiti$dmsc:marketReview";
instead of
workflow.parameters.workflowName = "activiti$marketReview";
in js file
now my workflow is trigger but document attached to it does not appear to other user other than admin
sry i was doing one mistake , in my share-workflow-form-config file i have written
<config evaluator="string-compare" condition="activiti$marketReview">
and was using
workflow.parameters.workflowName = "activiti$dmsc:marketReview";
instead of
workflow.parameters.workflowName = "activiti$marketReview";
in js file
now my workflow is trigger but document attached to it does not appear to other user other than admin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2013 07:50 AM
workflow.parameters["bpm:assignee"] = "admin"; ===> the wokflow is assigned to only 'admin' user.So how do you like that the document appear to other user than admin?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2013 08:25 AM
Hi
i want all reviewers present in wf process definition can view document , so do i have to give all the assignees in workflow.parameters [] which are present in process definition ?
i want all reviewers present in wf process definition can view document , so do i have to give all the assignees in workflow.parameters [] which are present in process definition ?
