in JBPM is possible to expose a custom REST Service in order to close custom task?
in the example below the process must wait a REST call from an external application in order to close the process.
How I can implement this requirement in JBPM 7.31?
If you remove manager.completeWorkItem(workItem.getId(), results); from RESTWorkItemHandler process execution will wait for completion of REST task. You can manually complete this task through kie-server REST API
[PUT] /server/containers/{containerId}/processes/instances/{processInstanceId}/workitems/{workItemId}/completed
Inplace of making REST task wait I will suggest to add Intermediate timer node or Intermediate Signal node inplace of REST task.
having a signal or receive task would make more sense here instead of creating Url for each process instance to complete. you can provide your implementation of the receive task i.e. a generic service that completes your task. or a signal that you can trigger when your custom rest service is invoked.
Related
Currently we are scheduling our robots using windows task manager. But in future we have to schedule our robots via wso2.Is it important to have an orchestrator? can we do without orchestrator ,is any alternate way?
And if not then how to do using orchestrator ?
The best way would be over the orchestator. For example you can create CRON Triggers https://docs.uipath.com/orchestrator/docs/managing-triggers.
But you can do it also without orchestrator. See:
https://forum.uipath.com/t/how-to-run-attended-bot-without-orchestrator/87417/2
Is there a way to check whether all the messages/flow-files in a processor group has cleared or not using rest api in shell script?
Basically, my use case is that I am stopping a nifi processor in my shell script via curl command. Then I need to wait till all the queues are empty and flow files have passed through before proceeding further.
Yes, you can query the status of individual connections or the process group status via the API. The easiest way to do this is perform the action in your browser and use the Developer Tools to monitor the request and copy/paste this to your invoking tool.
I want to have my application already started on my YARN cluster and allow the users to send additional commands. I am still in the design phase, but I'm confused on the best way about going about this. Is this possible? Could the user send some sort of REST command to the Application Master or Resource Manager that could then be passed to the running YARN Application?
You can if you're willing to build a custom AM and write your own REST API but writing a custom AM is not trivial. As for the RM, you can kill your application or move to another queue via REST API calls but not much else.
https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html
I'm trying to invoke a jbpm process with a custom object process variable via remote client against kie server.
The process does some updates on the process variable which I need to retrieve back.
What's the best way to retrieve the modified process variable?
Appreciate any examples along with answer.
[6.5.0 final]
If process instance is completed then you can use below REST API's to get process variable info
[GET] http://localhost:8080/kie-server/services/rest/server/queries/processes/instances/{ProcessInstanceID}/variables/instances
[GET] http://localhost:8080/kie-server/services/rest/server/queries/processes/instances/{ProcessInstanceID}?withVars=true
If process instance is active then you can use below REST API:
http://localhost:8080/kie-server/services/rest/server/containers/{containerId}/processes/instances/{ProcessInstanceId}/variables
I need to create a task, as in start an instance of a human task, so it appears in the My Tasks list. Is this even possible without having it linked to a process instance? It's just that I only need the Human Task processor as I'm using another program to handle the process. So in my other program it'll go through the workflow and then when it reaches a user task it creates the task in WSO2 BPS so it can be completed.
I'm using generated stubs in Eclipse for the SOAP requests.
This is supported. Just invoke Task service as normal web service using stubs (wsdl2java) or any other way (like SOAPUI). It will create a Humantask.