Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

cancel
Showing results for 
Search instead for 
Did you mean: 
paiyyavj13
Established Member II

Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

Jump to solution

Hi,

I am trying to use the amp: alfresco_http_activiti_client available in the git link: GitHub - rjmfernandes/alfresco_http_activiti_client , for triggering an Alfresco Process Services workflow from ACS via a script triggered by a rule.

I am using ACS 5.2, APS 1.6.2 Enterprise versions.

Below is my javascript which uses the "activiti" Root object from the above module:

//test script for http_activiti_client

var obj=eval('({"name":"test process"})');
activiti.startProcess("CustomAdhoc","Custom Adhoc Test Process",obj);

where: CustomAdhoc is my APS process name.

I am testing the module so I am not attaching the document and calling the startDocumentProcess method, instead am calling the startProcess method.

The error I get in logs is NullPointerException, I debugged and I believe that the ACS application is not able to search and retrieve the ProcessDefinition with the processName supplied, in my case: CustomAdhoc.

Is there any config change that is needed on APS ? Any pointers would help... Thank you...

1 Solution

Accepted Solutions
paiyyavj13
Established Member II

Re: Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

Jump to solution

I debugged and found out the issue and was able to call APS processes through ACS using root objects from the mentioned amp.

It worked when I supplied the document and document field properties to the startDocumentProcess method.

Earlier was trying to trigger a sample process without any document by calling the startProcess method, but could not- as the code did not have checks for document and document field properties being null.

View solution in original post

4 Replies
paiyyavj13
Established Member II

Re: Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

Jump to solution

I debugged and found out the issue and was able to call APS processes through ACS using root objects from the mentioned amp.

It worked when I supplied the document and document field properties to the startDocumentProcess method.

Earlier was trying to trigger a sample process without any document by calling the startProcess method, but could not- as the code did not have checks for document and document field properties being null.

all_fresco
Partner

Re: Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

Jump to solution

Hi all, The readme says: “After applying the amp you need to set some configuration on the alfrescop-global.properties file”, but where is the amp file?

paiyyavj13
Established Member II

Re: Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS processes

Jump to solution

if you build the project, you will see the amp file created in the target folder.

sherry_mathews
Customer

Re: Query regarding using the Alfresco amp alfresco_http_activiti_client for triggering the APS proc

Jump to solution

Please refer to this article for the steps to trigger an already modelled and deployed APS workflow/process from ACS.

https://github.com/sherrymax/acs-examples/tree/master/acs-invoke-aps-workflow