I'm using the latest Alfresco community edition (5.2 - 201707). I would like to create a task with a REST call for a group of users after I add files in repository. I can do it manually by going to: My Tasks -> Start Workflow -> Review and approve (pooled review) -> Start workflow.
I have been searching for a way to do this but in all the confusion about versions (community, enterprise, activity, etc) I cannot be a 100% sure if a way to do this by REST exists or not. In all documentation: Alfresco Content Services REST API Explorer there is no POST method for /tasks. Although some community posts say that it should exist.
Alternatively I can user Java API. Example would be appreciated, especially regarding how to initialize connection to a local alfresco server.
Ok, I'm trying to understand your scenario, but I'm struggling to see where you are stuck.
Can you please elaborate on: "I would like to create a task with a REST call for a group of users after I add files in repository."
It sounds like you want to extend the review workflow with an extra service task to do a rest call. This workflow is executed as part of the content repository with a version of activiti embeded in there.
You can do a REST call or a java call depending if you want to create another Java app that points to the same DB of the content repository. In that way you should be able to interact with tasks programatically. Is that what you are looking for?
yeah it is possible to start another process from a Service Task. Do you really want to do it via a POST? because if you are in the context of the engine you can just use a Java call to do that using the RuntimeService from your Java Delegate.
I can't speak for OP, but my use case is to have an external product initiate an audit/approval workflow in Alfresco in response to certain events, which will eventually be fed back into the external product as a "go/no-go" flag.