As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I have created a Process for Alfresco Process Service and now I want to trigger it from Alfresco Content Service when, an E-mail comes to Alfresco Content Service, how it's possible?
When an email arrives at ACS (i.e. "is filed as a document") you can have a custom behaviour (which you implemented using Java APIs) fire and call APS via its REST API to trigger your custom process.
Thank you for the reply!.can you please tell me which behavior I supposed to use in my case?
onCreateNode sounds about right when you want to start it as soon as the document / email has been filed.
Thank you!!but while getting Process definition from activiti webscript by the following call:
GET /alfresco/service/activiti/server/{token1} It shows:
What is token1 here?
I don't really understand why you would be calling that webscript... That webscript is a backend for APS to call, and I thought you wanted to trigger an APS process from ACS, so you'd have to do call in the exact opposite direction. Also, that webscript is likely part of the Enterprise-only ACS / APS connector used for some internal handling, and as such is not supposed to be called from custom code (I mean, the response message states it hasn't been whitelisted).
For calling APS from ACS, take a look at the Alfresco Process Services ReST API documentation.
Thank you!
Now I am using already defined method from com.activiti.alfresco.service.ActivitiService Interface which is :
"public void startProcessById(String processId, String processName, Map<String, Object> formValues, ActivitiService.DocumentContext documentContext)"but I have no idea about "ActivitiService.DocumentContext documentContext" Parameter and how to pass "formValues" parameter as
Map<String, Object> in startProcessById() method ?
Could you please guide me, how to use those Parameters in my custom Behaviour?
Hi,
I have written following code to trigger the process, Please have a look!
private Behaviour onCreateNode; public void init() { this.onCreateNode = new JavaBehaviour(this, "onCreateNode", NotificationFrequency.TRANSACTION_COMMIT); this.policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateNode"), ContentModel.TYPE_CONTENT, this.onCreateNode); }
public void onCreateNode(ChildAssociationRef childasso) { NodeRef node=childasso.getChildRef(); DocumentContext documentContext= new DocumentContext(node,"formFieldId"); Map<String, Object> formValues = new HashMap<String, Object>(); formValues.put(key,value); try {public void startProcessById(String processId, String processName, Map<String, Object> formValues, ActivitiService.DocumentContext documentContext) } catch (RemoteActivitiException | ActivitiAuthenticationException e) { e.printStackTrace(); }
but while executing it in Maven it shows me that: Package does not exist but I have uploaded the Package.