cancel
Showing results for 
Search instead for 
Did you mean: 

Workflows in HR-app

tobix10
Champ on-the-rise
Champ on-the-rise
Can I check how workflows work in hr application from workdesk-community?

I set up alfresco as docs says:
1. added BPM to EcmAdapter
2. applied amp ow_webscript

On
http://{ALFRESCO_SERVER}:{PORT}/alfresco/service/index/package/com/wewebu/ecm/alfresc
o/ws
I see this script installed.

I've created workflow in share(review some file from one dossier), but it doesn't seem to work in workdesk.

16 REPLIES 16

deko
Star Contributor
Star Contributor
Could you explain a little bit more in detail which functionalities don´t "seem to work in workdesk"?

Did you setup the <BPM> connection node in Workdesk owbootstrap.xml? Did you setup BPM plugins with Alfresco Workdesk Configurator (delivered with the Workdesk community artifact) in owplugins.xml? You should setup at least a BPM master plugin (class com.wewebu.ow.server.plug.owbpm.OwBPMDocument) to display tasks assigned to the cureently logged-in Workdesk user. In addition you shloud configure the "Launch Pad" master plugin (class com.wewebu.ow.server.plug.ownew.OwNewDocument) and the "Launch Workflow" document plugin (class com.wewebu.ow.server.plug.owbpm.plug.OwBPMLaunchProcessorFunction) to be able to launch workflows also from within Workdesk (this is why you need to apply ow_webscript.amp in fact).

Regards,
Dennis

tobix10
Champ on-the-rise
Champ on-the-rise
I've BMP, Launch Pad and Launch Workflow plugins. However when I want to start a new workflow I get internal server error(500)
<blockquote>Error Source: OECM

java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at com.wewebu.ow.server.ui.OwAppContext.handleRequest(OwAppContext.java:998)
   at com.wewebu.ow.server.app.OwMainAppContext.handleRequest(OwMainAppContext.java:657)
   at com.wewebu.ow.server.ui.OwWebApplication.handleRequest(OwWebApplication.java:359)
   at org.apache.jsp.default41_jsp._jspService(default41_jsp.java:79)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at com.wewebu.ow.server.servlets.OwServletFilter.doFilter(OwServletFilter.java:57)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at com.wewebu.ow.server.ui.OwNavigationView.navigate(OwNavigationView.java:303)
   at com.wewebu.ow.server.ui.OwNavigationView.onNavigate(OwNavigationView.java:409)
   … 33 more
Caused by: com.wewebu.ow.server.ecmimpl.alfresco.bpm.rest.OwRestException: Could not start workflow.
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMLaunchableWorkItem.dispatch(OwAlfrescoBPMLaunchableWorkItem.java:107)
   at com.wewebu.ow.server.plug.owbpm.plug.OwBPMJspProcessorView.onDispatch(OwBPMJspProcessorView.java:203)
   … 39 more
Caused by: Internal Server Error (500) - Internal Server Error
   at org.restlet.resource.ClientResource.doError(ClientResource.java:612)
   at org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:236)
   at $Proxy266.start(Unknown Source)
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMLaunchableWorkItem.dispatch(OwAlfrescoBPMLaunchableWorkItem.java:91)
   … 40 more
</blockquote>

Another problem is with workflows editing. Now I have set com.wewebu.ow.server.plug.owbpm.OwBPMDocument.1374734308407.Doc Master Plugin in MIME ow_workitem/item, but after clicking edit icon nothing happens.

deko
Star Contributor
Star Contributor
The 500 RestException looks like the ow_webscript.amp was not applied correctly and/or you cannot contact the services from Workdesk (e.g. because of firewall configuration or similar).

So you can see Tasks now in the BPM plugin as you would see them in the Share Task inbox? You configured the BPM master plugin ID for the task MIME type, but you need to configure the "Execute step" document plugin for the task MIME type. The MIME type for work item (task) should be configured in owmimetable.xml like in the following example:


  <mime optionid="" type="ow_workitem/item">
    <icon>bpm/workitem_standardproc.png</icon>
    <documentfunction>com.wewebu.owbpm.StandardProcessor</documentfunction>
  </mime>


Now you just need an "Execute step" plugin in owplugins.xml with the plugin ID (see id node below) as defined above. The plugin generated by Alfresco Workdesk Configurator could look like the following:


  <PlugIn type="ow_docfunction">
    <Name>Execute Step</Name>
    <id>com.wewebu.owbpm.StandardProcessor</id>
    <Description>Execute work item</Description>
    <Vendor>Alfresco Business Solutions</Vendor>
    <Version>4.1.1</Version>
    <ClassName>com.wewebu.ow.server.plug.owbpm.plug.OwBPMStepProcessorFunction</ClassName>
    <helppath>owbpm/processstep.jsp</helppath>
    <icon />
    <iconbig />
    <Multiselect>true</Multiselect>
    <ContextMenu>true</ContextMenu>
    <ObjectInstance>true</ObjectInstance>
    <ColumnTitle />
    <AutoOpen>false</AutoOpen>
    <PreviewAttachmentName arrayindex="0" />
    <objecttypes>
      <type>OBJECT_TYPE_WORKITEM</type>
      <type>OBJECT_TYPE_WORKITEM_PROXY</type>
    </objecttypes>
    <objectclasses>
    </objectclasses>
    <AttachmentDocumentFunctions>
      <id>com.wewebu.ow.owdocprops</id>
      <id>com.wewebu.ow.owdoccopy</id>
      <id>com.wewebu.ow.owdocview.OwDownloadAsZipDocumentFunction</id>
    </AttachmentDocumentFunctions>
  </PlugIn>


This plugin will apear in the task list after you refreshed configuration or you restarted the application server and when clicking on it you will be able to edit the task properties and execute the task.

Regards,
Dennis

tobix10
Champ on-the-rise
Champ on-the-rise
Ok, now workflow edit/step is working.

I still can't launch workflow from workdesk(internal server error). I am testing it on localhost and my firewall is switched off.
Reappling amps doesn't fix this. I didn't get errors from this .bat(now and at first time).

deko
Star Contributor
Star Contributor
Are you using a JSP to launch the Workflow? Do you see all properties of the start task? It could be, that you are using a JSP and only some properties of the task are configured and you are missing to fill out required properties, what results in this error. Check the plugin to launch the workflow and remove JSP cnfiguration, then you should see the standard Workdesk properties dialog displaying all properties of the task . Go through the properties and try to fill out as much as possible and determine which of the properties is required to start the task. In default dialogs Workdesk should mark required properties with an asterisk.

Which Alfresco version are you using by the way?

tobix10
Champ on-the-rise
Champ on-the-rise
I am using standard processor, I don't have any jsp configuration. Everything is going on fresh install of alfresco 4.2c.

Please look on attached images they show how workflow looks in share and workdesk. The Reviewer field is missing in workdesk.

My BPM plugins configuration:
<python>
<PlugIn type="ow_master">
    <Name>BPM</Name>
    <id>com.wewebu.ow.server.plug.owbpm.OwBPMDocument.1374734308407</id>
    <Description>Access to Alfresco Workdesk BPM</Description>
    <Vendor>Alfresco Business Solutions</Vendor>
    <Version>4.1.1</Version>
    <ClassName>com.wewebu.ow.server.plug.owbpm.OwBPMDocument</ClassName>
    <ViewClassName>com.wewebu.ow.server.plug.owbpm.OwBPMView</ViewClassName>
    <helppath />
    <icon>/images/plug/owbpm/bpm.png</icon>
    <MaxChildCount>100</MaxChildCount>
    <AttachmentDocumentFunctions>
      <id>com.wewebu.ow.owdocprops</id>
    </AttachmentDocumentFunctions>
    <ResultListViews>
      <view classname="com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewRow">
        <paging classname="com.wewebu.ow.server.dmsdialogs.views.OwNumberBlockPageSelectorComponent">
          <UseImages>false</UseImages>
          <NumberOfSelectablePages>5</NumberOfSelectablePages>
        </paging>
        <isNoteEditable>true</isNoteEditable>
        <NoteProperties>
          <NoteProperty />
        </NoteProperties>
        <viewmasks>
          <mask>VIEW_MASK_INLINE_EDITING</mask>
          <mask>VIEW_MASK_INSTANCE_PLUGINS</mask>
          <mask>VIEW_MASK_MULTI_SELECTION</mask>
          <mask>VIEW_MASK_USE_DOCUMENT_PLUGINS</mask>
        </viewmasks>
        <ThumbnailTypes />
        <Tooltip />
        <readOnlyColumns />
      </view>
      <view classname="com.wewebu.ow.server.dmsdialogs.views.OwObjectListViewFilterEXTJSGrid">
        <isNoteEditable>false</isNoteEditable>
        <NoteProperties>
          <NoteProperty>F_Comment</NoteProperty>
        </NoteProperties>
        <viewmasks>
          <mask>VIEW_MASK_INLINE_EDITING</mask>
          <mask>VIEW_MASK_INSTANCE_PLUGINS</mask>
          <mask>VIEW_MASK_MULTI_SELECTION</mask>
          <mask>VIEW_MASK_USE_DOCUMENT_PLUGINS</mask>
        </viewmasks>
        <Tooltip />
      </view>
    </ResultListViews>
    <Queues>
      <Queue>/ow_user/*</Queue>
      <Queue>delimiter</Queue>
    </Queues>
    <PriorityRules>
      <PriorityRule container="/ow_user/*" resource="/ow_user/*">
        <expression><![CDATA[object.bpm\Smiley Tongueriority='3']]></expression>
        <styleclass>PriorityRuleStyleLow</styleclass>
      </PriorityRule>
      <PriorityRule container="/ow_user/*" resource="/ow_user/*">
        <expression><![CDATA[object.bpm\Smiley Tongueriority='2']]></expression>
        <styleclass>PriorityRuleStyleMed</styleclass>
      </PriorityRule>
      <PriorityRule container="/ow_user/*" resource="/ow_user/*">
        <expression><![CDATA[object.bpm\Smiley Tongueriority='1']]></expression>
        <styleclass>PriorityRuleStyleHigh</styleclass>
      </PriorityRule>
    </PriorityRules>
    <settingsset>
      <columninfo type="com.wewebu.ow.server.settingsimpl.OwSettingsPropertyStringConfigurationBox" scope="user" edit="true" list="true" displayname="Workflow attributes" helppath="">
        <property>bpm:description</property>
        <property>OW_TASK_TITLE</property>
        <property>OW_ATTACHMENTS</property>
        <property>bpm:status</property>
        <property>bpm:comment</property>
        <property>bpm:startDate</property>
        <property>cm:created</property>
        <property>bpmSmiley Tongueriority</property>
        <property>owdbpm:resubmissionDate</property>
        <property>owdbpm:Note</property>
        <comboselect displayname="Description">bpm:description</comboselect>
        <comboselect displayname="Title">OW_TASK_TITLE</comboselect>
        <comboselect displayname="Status">bpm:status</comboselect>
        <comboselect displayname="Start Date">bpm:startDate</comboselect>
        <comboselect displayname="Created">cm:created</comboselect>
        <comboselect displayname="Priority">bpmSmiley Tongueriority</comboselect>
        <comboselect displayname="Comment">bpm:comment</comboselect>
        <comboselect displayname="Document">OW_ATTACHMENTS</comboselect>
        <comboselect displayname="Resubmission Date">owdbpm:resubmissionDate</comboselect>
        <comboselect displayname="Note">owdbpm:Note</comboselect>
      </columninfo>
      <ColumnSortCriteria type="com.wewebu.ow.server.settingsimpl.OwSettingsPropertySort" scope="user" edit="true" list="true" displayname="Initial Sorting" helppath="" />
      <proxy maxsize="1" type="com.wewebu.ow.server.settingsimpl.OwSettingsPropertyBPMProxy" scope="site" edit="true" list="true" displayname="Proxy" helppath="" />
    </settingsset>
  </PlugIn>
  <PlugIn type="ow_master">
    <Name>Launch Pad</Name>
    <id>com.wewebu.ow.New</id>
    <Description>Page where new activities (e.g. workflows) can be started</Description>
    <Vendor>Alfresco Business Solutions</Vendor>
    <Version>4.1.1</Version>
    <ClassName>com.wewebu.ow.server.plug.ownew.OwNewDocument</ClassName>
    <ViewClassName>com.wewebu.ow.server.plug.ownew.OwNewView</ViewClassName>
    <helppath />
    <icon>/images/plug/owbpm/bpm.png</icon>
    <Extensions>
      <Extension>
        <Name>Launch new workflows (Standard)</Name>
        <id>ownew.OwBPMNewWorkflowStandardExtension</id>
        <Description>Show Launch workflow dialog using the standard renderer for workflow properties</Description>
        <ClassName>com.wewebu.ow.server.plug.owbpm.plug.OwBPMNewWorkflowExtension</ClassName>
        <icon />
        <iconbig />
        <JspForm />
      </Extension>
    </Extensions>
  </PlugIn>
  <PlugIn type="ow_docfunction">
    <Name>Launch Workflow</Name>
    <id>com.wewebu.owbpm.LaunchProcessor.workflow</id>
    <Description>Launch workflow with object(s) as attachment(s) (with or without JSPForm)</Description>
    <Vendor>Alfresco Business Solutions</Vendor>
    <Version>4.1.1</Version>
    <ClassName>com.wewebu.ow.server.plug.owbpm.plug.OwBPMLaunchProcessorFunction</ClassName>
    <helppath />
    <icon />
    <iconbig />
    <Multiselect>true</Multiselect>
    <ContextMenu>true</ContextMenu>
    <ShowInEditViews>false</ShowInEditViews>
    <ObjectInstance>false</ObjectInstance>
    <ColumnTitle />
    <objecttypes>
      <type>OBJECT_TYPE_DOCUMENT</type>
    </objecttypes>
    <JspForm />
    <objectclasses />
    <AttachmentDocumentFunctions>
      <id>com.wewebu.ow.owdocprops</id>
      <id>com.wewebu.ow.owdoccopy</id>
    </AttachmentDocumentFunctions>
  </PlugIn>
  <PlugIn type="ow_docfunction">
    <Name>Execute Step</Name>
    <id>com.wewebu.owbpm.StandardProcessor</id>
    <Description>Execute work item</Description>
    <Vendor>Alfresco Business Solutions</Vendor>
    <Version>4.1.1</Version>
    <ClassName>com.wewebu.ow.server.plug.owbpm.plug.OwBPMStepProcessorFunction</ClassName>
    <helppath />
    <icon />
    <iconbig />
    <Multiselect>false</Multiselect>
    <ContextMenu>true</ContextMenu>
    <ObjectInstance>true</ObjectInstance>
    <ColumnTitle />
    <AutoOpen>false</AutoOpen>
    <PreviewAttachmentName arrayindex="0" />
    <objecttypes>
      <type>OBJECT_TYPE_WORKITEM</type>
      <type>OBJECT_TYPE_WORKITEM_PROXY</type>
    </objecttypes>
    <objectclasses />
    <AttachmentDocumentFunctions>
      <id>com.wewebu.ow.owdocprops</id>
      <id>com.wewebu.ow.owdoccopy</id>
      <id>com.wewebu.ow.owdocview.OwDownloadAsZipDocumentFunction</id>
    </AttachmentDocumentFunctions>
  </PlugIn>
</python>

deko
Star Contributor
Star Contributor
Please do the following:

In owbootstrap.xml, add the property for hidden transition as system property under  the PreferredPropertyType node (already there with some properties!), so that it is no longer used in your dialog:



<EcmAdapter>
   <PreferredPropertyType optionid="">
        …
        <Property type="system">D:bpm:workflowTask.bpm:hiddenTransitions</Property>
        …
   </PreferredPropertyType>
   …


All you have to do to launch a workflow then is to fill at least those property fields with the asterisk 😉

Dennis

tobix10
Champ on-the-rise
Champ on-the-rise
OK, that seems to work, but when I start "Review and approve" workflow from share(because in workdesk I don't see Reviewer field) by admin account and set the reviewer to some other account then in workdesk that user doesn't see attachment files.

Does it mean that I have to start workflows only from workdesk to work correctly?
What to do to see Reviewer field from workdesk launch workflow form?

deko
Star Contributor
Star Contributor
Based on circumstances in the connection between CMIS and the current Activiti API it is not possible to set a task assignee in Workdesk. Currently tasks are always assigned to the task launcher.

To workaround you have some possibilities:

1. You could configure the "Forward" plugin in Workdesk, which enables you to forward the task to another users inbox after you launched it by running the plugin on the task in your own inbox.

2. You could create a custom workflow definition, where you setup a task listener, which will set the assignee value hard coded to a user or a user group for the launch step. So you would have the possiility, to get it assigned automatically in the background.

I know this is not behaving as it used to, but the Workdesk team is currently working together with the Activiti team to bring lots of improvements with the upcoming versions 4.2 of Alfresco and Alfresco Workdesk.

Regards,
Dennis