I was doing the steps in the documentation, where we are going to interact with REST API in order to execute a process instance. However, I got an error where it says
Any pointers of my mistake will be appreciated
I was doing the steps in the documentation, where we are going to interact with REST API in order to execute a process instance. However, I got an error where it says
Any pointers of my mistake will be appreciatedHello,
I suggest you to go to the following url to discover and test rest api :
Itās really self-explained.
JC
Hey JC, thanks for telling me the documentation however can I ask you a question, so I was following the Spring Integration from the documentation. I was at this point;
We can now start a new process instance, providing the user name in the POST body:
curl -H āContent-Type: application/jsonā -d ā{āassigneeā : ājbarrezā}ā http://localhost:8080/process
I tried the command from the flowable-rest documentation and it results to this:
Which I believe its all process that I have assigned to the user ājbarrezā (please tell me if I am wrong). So with this assumption, I have assigned 3 process to ājbarrezā and when I am going to fetch the tasks assigned to him, somehow it shows 0 tasks which is weird since each process has one user task.
What am I missing here or perhaps I got it all wrong? Thanks a bunch!
One item I frequently forget in the modeler is to set the assignee on my user tasks. Did you update your BPMN as instructed:
<userTask id="theTask" name="my task" flowable:assignee="${person.id}"/>
When the task starts it will look for an id
attribute on a person
object in the process variables.
Side note: Piping your curl commands through jq will make the output more readable.
Hello, yes I did update my BPMN but this is the result:
{ātimestampā:ā2019-10-21T02:22:24.282+0000ā,āstatusā:500,āerrorā:āInternal Server Errorā,āmessageā:āUnknown property used in expression: ${person.id}ā,āpathā:ā/processā}
The command that I used is: curl -H āContent-Type: application/jsonā -d ā{"assignee": "jbarrez"}ā http://localhost:8081/process
Ok, I just ran through the doc to this point (I skipped changing the datasource to mySQL). The only issue I ran into is that the entity class should be public if itās in a different file. Are you getting a stack trace on the Java side when you execute curl -H āContent-Type: application/jsonā -d ā{āassigneeā: ājbarrezā}ā http://localhost:8081/process
Try changing:
@Entity
class Person {
to
@Entity
public class Person {