Quantcast
Channel: Alfresco Forums - Workflow
Viewing all 191 articles
Browse latest View live

Custom workflow forms using eclipse kickstart project

$
0
0
Workflow

issue manually placing files generated by eclipse kickstart project

-preamble
Hello, First things first I wanted to apologize if this has been asked already or posted in the wrong forum, but I've been reading several documents/guides/forum posts trying to find a solution to this simple question. (also new to alfresco, never used it prior to this project I've been working on since last week)

e.g I've gone through
http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html
http://jmuras.com/blog/2012/creation-of-workflow-in-alfresco-using-activiti-step-by-step/
as well as the http://ecmarchitect.com/ maven and model tutorial

Setup
-vanilla 5.0.d alfresco linux installation, ran installer with defaults so its using everything out of the box

-situation/question
I came across a video showing off the activiti eclipse plugin to make kickstart projects, which seemed super awesome, easy to use and quick for deployment, however I do not believe my alfresco instance to be set up for CMIS and/or CMIS doesn't want to work. So I went with the alternative and exported the project to the target folder, generated the 3 repo xml files and 3 share xml files, I manually copied them over to the machine, placing the repo files in AFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/workflows. That being said the workflow is working beautifully and as intended (assigns stuff to the proper groups, does as its told ect.), the problem is with the form customization (it's not picking up the configuration files, just generates the default form for a workflow, which I'm assuming has to do with the 3 xml filed generated under shared not being in the correct location. I tried placing them in several places, most notably ALFRESCO_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco and ALFRESCO_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/web-extension and they still don't seem to be picked up.

So my question is, is the a specific place to put the 3 shared xml files generated from the kickstart process, and are there any file I have to 'configure' or change to point to them to get the custom forms to appear (they are just really simple files just created to test the deployment)

also there appears to be no problems in catalina.out tomcat log when the server starts up

Files
projectname-module-deployment.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<module-deployment>
<extension-module>kickstart_form_senateapproval</extension-module>
</module-deployment>

projectname-share-context.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean init-method="register" id="senateApproval.workflowBootstrap"class="org.springframework.extensions.config.ConfigBootstrap">
<property ref="web.config" name="configService"/>
<property name="configs">
<list>
<value>classpath:alfresco/web-extension/senateApproval-config-custom.xml</value>
</list>
</property>
</bean>
</beans>

projectname-cofig-custom.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<extension>
<modules>
<module>
<id>kickstart_form_senateapproval</id>
<configurations>
<config condition="senateapproval:step1" evaluator="task-type">
<forms>
<form>
<field-visibility>
<show id="packageItems"/>
<show id="senateapproval:valueselect"/>
<show id="transitions"/>
</field-visibility>
<appearance>
<set appearance="title" label-id="Approve document" id="info"/>
<field set="info" id="packageItems"/>
<field set="info" label-id="Value select" id="senateapproval:valueselect"/>
<set id="response"/>
<field set="response" id="transitions"/>
</appearance>
</form>
</forms>
</config>
<config condition="senateapproval:step2group2" evaluator="task-type">
<forms>
<form>
<field-visibility>
<show id="packageItems"/>
<show id="senateapproval:valueselect"/>
<show id="transitions"/>
</field-visibility>
<appearance>
<set appearance="title" label-id="Approve document" id="info"/>
<field set="info" id="packageItems"/>
<field set="info" label-id="Value select" id="senateapproval:valueselect"/>
<set id="response"/>
<field set="response" id="transitions"/>
</appearance>
</form>
</forms>
</config>
<config condition="activiti$senateApproval" evaluator="string-compare">
<forms>
<form>
<field-visibility>
<show id="senateapproval:comment"/>
<show id="packageItems"/>
<show id="transitions"/>
</field-visibility>
<appearance>
<set template="/org/alfresco/components/form/2-column-set.ftl" appearance="title" label-id="Senate Test 1" id="info"/>
<field set="info" label-id="comment" id="senateapproval:comment">
<control template="/org/alfresco/components/form/controls/textarea.ftl"/>
</field>
<field set="info" id="packageItems"/>
<set id="response"/>
<field set="response" id="transitions"/>
</appearance>
</form>
</forms>
</config>
<config condition="senateapproval:start" evaluator="task-type">
<forms>
<form>
<field-visibility>
<show id="senateapproval:comment"/>
<show id="packageItems"/>
<show id="transitions"/>
</field-visibility>
<appearance>
<set template="/org/alfresco/components/form/2-column-set.ftl" appearance="title" label-id="Senate Test 1" id="info"/>
<field set="info" label-id="comment" id="senateapproval:comment">
<control template="/org/alfresco/components/form/controls/textarea.ftl"/>
</field>
<field set="info" id="packageItems"/>
<set id="response"/>
<field set="response" id="transitions"/>
</appearance>
</form>
</forms>
</config>
</configurations>
</module>
</modules>
</extension>
5.0.d

How to send workflow/task property values to serviceTask activiti:type="shell"

$
0
0
Workflow

I have serviceTask activiti:type="shell" and I need to pass some parameter values to my script,

How to get access or send these values inside my bpmn ?

- workflow description ?
- task id and/or workflow id ?

I already tried:

execution.setVariable('putwf_wfName', bpm_workflowDescription);

error: org.alfresco.scripts.ScriptException: 07170037 Failed to execute supplied script: 07170036 ReferenceError: "bpm_workflowDescription" is not defined. (AlfrescoJS#2)

execution.setVariable('putwf_wfName', taskInstance.id);

error: "org.alfresco.scripts.ScriptException: 07170035 Failed to execute supplied script: 07170034 ReferenceError: "taskInstance" is not defined. (AlfrescoJS#3)"

Please help,

<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"><process id="echoShellLinux" isExecutable="true"><startEvent id="theStart"></startEvent><sequenceFlow id="flow-mystart" sourceRef="theStart" targetRef="shellEcho"><extensionElements><activiti:executionListener event="start"class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"><variable name="bpm_workflowDescription" access="read"/><activiti:field name="script"><activiti:string><![CDATA[logger.log("Here we are !!!");]]>            	
            	execution.setVariable('wf_dt','MyParam1');
            	execution.setVariable('putwf_wfName', bpm_workflowDescription);</activiti:string></activiti:field></activiti:executionListener></extensionElements></sequenceFlow><serviceTask id="shellEcho" activiti:type="shell"><extensionElements><activiti:field name="command"><activiti:string><![CDATA[/home/ultra/alfresco/projects/logme.sh]]></activiti:string></activiti:field><activiti:field name="arg1"><activiti:expression>${wf_dt}</activiti:expression></activiti:field><activiti:field name="arg2"><activiti:expression>${putwf_wfName}</activiti:expression></activiti:field><activiti:field name="outputVariable"><activiti:string><![CDATA[resultVar]]></activiti:string></activiti:field></extensionElements></serviceTask><sequenceFlow id="sequenceFlow-92315e42-3ba1-480e-8788-c57ca217bbe2" sourceRef="shellEcho" targetRef="theTask"></sequenceFlow><userTask id="theTask" name="keep-alive task"></userTask><sequenceFlow id="sequenceFlow-4ab2aa0a-f004-4296-8ead-58d2f0438c25" sourceRef="theTask" targetRef="theEnd"></sequenceFlow><endEvent id="theEnd"></endEvent></process><bpmndi:BPMNDiagram id="BPMNDiagram_echoShellLinux"><bpmndi:BPMNPlane bpmnElement="echoShellLinux" id="BPMNPlane_echoShellLinux"><bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart"><omgdc:Bounds height="35.0" width="35.0" x="70.0" y="140.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="shellEcho" id="BPMNShape_shellEcho"><omgdc:Bounds height="60.0" width="100.0" x="80.0" y="0.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="theTask" id="BPMNShape_theTask"><omgdc:Bounds height="60.0" width="100.0" x="230.0" y="0.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd"><omgdc:Bounds height="35.0" width="35.0" x="295.0" y="150.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow-mystart" id="BPMNEdge_flow-mystart"><omgdi:waypoint x="87.0" y="140.0"></omgdi:waypoint><omgdi:waypoint x="42.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="42.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="80.0" y="30.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-92315e42-3ba1-480e-8788-c57ca217bbe2" id="BPMNEdge_sequenceFlow-92315e42-3ba1-480e-8788-c57ca217bbe2"><omgdi:waypoint x="180.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="192.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="192.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="230.0" y="30.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-4ab2aa0a-f004-4296-8ead-58d2f0438c25" id="BPMNEdge_sequenceFlow-4ab2aa0a-f004-4296-8ead-58d2f0438c25"><omgdi:waypoint x="330.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="342.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="342.0" y="30.0"></omgdi:waypoint><omgdi:waypoint x="312.0" y="150.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></definitions>

Add new property to existing workflows

$
0
0
Workflow

Hi,

I want to add a new property to out-of-box workflows available in Alfresco community (Custom aspect). I want user to add value to this property and saved that with workflow node. I managed to add a new field to workflow forms through share-config-custom.xml. However still value doesn't store with the node. I want to access these values through webscript "/alfresco/service/api/workflow-instances/". Can I do this using a model in AMP package? I want to add property to existing workflow, so how can I do it through new model?

5.0.a

Dasu

How to call an external REST Service from Activiti in Alfresco 4.1?

$
0
0
Workflow

Hi,

I have tried to find examples that describe how to call an external REST service from an automated task in Activiti that is embedded in Alfresco 4.1.

Here is the use case:
1) Start an Activiti workflow
2) collect metadata from several user tasks and store in the workflow instance
3) invoke and a web service that has an endpoint on a non-Alfresco server to do some work (passing the metadata collected from the user tasks)
4) branch the workflow based on success or failure of the external service call
5) If success end the workflow, if failure route to a user to inform them of the service failure

Any help would be greatly appreciated

4.1

Workflow could not be started

$
0
0
Workflow

i have problem in my workflow

when i deploy my workflow is succesfull and no error but when i choose to use a pop-up "Workflow could not be started" but in log no have error please help me

sorry my english so bad

4.2.b

Unable to start workflow with email notification checkbox checked after replacing wf-email.ftl.html

$
0
0
Workflow

Unable to start workflow with email notification checkbox checked after replacing wf-email.html.ftl(I deleted this file and uploaded it back with some changes).Please help me to resolve this issue

Error 08030016 Failed to start workflow activiti$activitiAdhoc:1:4.

regards

Raghav Bhardwaj

5.0.d

combo box

$
0
0
Workflow

I want to ask how to make a combo box in workflow??

sorry bad english

4.2.b

Hi Please guide me how can i undeploy and redeploy workflow definations in alfresco-5.0.d

$
0
0
Workflow

Hi Please guide me how can i undeploy and redeploy workflow definations in alfresco-5.0.d. Please share exact steps required to do the same with file names etc.

regards

Raghav Bhardwaj

5.0.d

Query tasks.

$
0
0
Workflow

Hi. Please help me.
Can I somehow filter tasks, that was assigned to a group.
e.g. I have a custom dashlet, which displays tasks assigned to a group.

Workflow approuval status display

$
0
0
Workflow

Dear all,

I've been searching for a couple of days now to try to see how to display the document status (i.e. "approuved" or "rejected")once a workflow is complete.
I would expect to see seomthing, somewhere saying "Approuved on... by ...". A bit like I can see on the detailed workflow page.
I saw some examples but the posts are at least 2 years old and I'm using version 5.0d.

Is there a way to display that information on the file detailed view?

5.0.d

Localization of in share-config-custom.xml

$
0
0
Workflow

Hi there,

after going through a lot of stuff regarding Alfresco workflow development using AMP, including the excellent tutorials of @jpotts, I am getting nuts over one remaining issue: How can one localize the title in a custom share form?

I did try everything (as far as I can see): Different values for the label-id attribute, different places and namings of the messages files, checked over and over the bean declarations to include all these files, did a lot of test scenarios to identify the correct notation of the id without success ... and googled the world up and down without any relevant result. But obviously it seems as I am too stupid to identify the right way.

Could anybody please help me with a hint, a URL, or a working example regarding the file structure, and how to set up a localized set title?

Thanks a lot!

Cheers Frank

workflow

$
0
0
Workflow

I want to ask I want to create a workflow that when the user no subgroup Should he then he will perform a task if he is not in the subgroup then the user will do the task b

how I can distinguish subgroups with the group?

sorry bad english

4.2.b

my workflow error

$
0
0
Workflow

I want to ask

I create workflows and make the division of tasks if he is in the group he was going to the task manager and if he is not a manager him to task b

and I take the user from the group manager using
var capacity = people.getGroup ("WF_SO_USR_MGR");
var nameGroup;
nameGroup.members = people.getMembers (capacity);

but there are errors like this org.alfresco.scripts.ScriptException: 08100020 Failed to execute supplied script: Group is a mandatory parameter

whether there could be help

sorry bad english

4.2.b

Workflow and permission

$
0
0
Workflow

How to prevent specific users or group from executing workflow?

4.2.f

Command line call and exchange document in node

$
0
0
Workflow

Hi there,

currently, I implement a workflow for an invoice process. At one point, I would like to call a (UNIX) system component, which OCRs the given node's document, and replaces the source document with the result.

My questions are:

1. How can I call a UNIX system component via command line and process the transformation?
2. How can I exchange the source document with the resulting document?

Thank you very much for your help.

Frank


Workflow approuval status display

$
0
0
Workflow

Dear all,

I've been searching for a couple of days now to try to see how to display the document status (i.e. "approuved" or "rejected")once a workflow is complete.
I would expect to see seomthing, somewhere saying "Approuved on... by ...". A bit like I can see on the detailed workflow page.
I saw some examples but the posts are at least 2 years old and I'm using version 5.0d.

Is there a way to display that information on the file detailed view?

5.0.d

Localization of in share-config-custom.xml

$
0
0
Workflow

Hi there,

after going through a lot of stuff regarding Alfresco workflow development using AMP, including the excellent tutorials of @jpotts, I am getting nuts over one remaining issue: How can one localize the title in a custom share form?

I did try everything (as far as I can see): Different values for the label-id attribute, different places and namings of the messages files, checked over and over the bean declarations to include all these files, did a lot of test scenarios to identify the correct notation of the id without success ... and googled the world up and down without any relevant result. But obviously it seems as I am too stupid to identify the right way.

Could anybody please help me with a hint, a URL, or a working example regarding the file structure, and how to set up a localized set title?

Thanks a lot!

Cheers Frank

workflow

$
0
0
Workflow

I want to ask I want to create a workflow that when the user no subgroup Should he then he will perform a task if he is not in the subgroup then the user will do the task b

how I can distinguish subgroups with the group?

sorry bad english

4.2.b

my workflow error

$
0
0
Workflow

I want to ask

I create workflows and make the division of tasks if he is in the group he was going to the task manager and if he is not a manager him to task b

and I take the user from the group manager using
var capacity = people.getGroup ("WF_SO_USR_MGR");
var nameGroup;
nameGroup.members = people.getMembers (capacity);

but there are errors like this org.alfresco.scripts.ScriptException: 08100020 Failed to execute supplied script: Group is a mandatory parameter

whether there could be help

sorry bad english

4.2.b

Workflow and permission

$
0
0
Workflow

How to hide the workflow option on start workflow page for all other users except a specific group.

5.0.d
Viewing all 191 articles
Browse latest View live