Hide
Preparation
1. Install jBP from jbpm-server-7.33.0.Final-dist.zip
2. Start jBPM and login to Business Central as kris/krisv
3. Navigate to "Projects -> MySpace" and add sample application "Evaluation Process" to the space
4. Open the project and do "Build & Install:
5. Inspect BC's maven repository - evaluation-1.0.0-... jar and pom must be there
The problem
1. Deploy evaluation kjar onto kie-server
Run
curl -v -X PUT -H 'Content-type: application/json' -u krisv:krisv -d '{"container-id":"evaluation","release-id":{"group-id":"evaluation","artifact-id":"evaluation","version":"1.0.0-SNAPSHOT"}}' http:
The HTTP response shoud be "201 Created" and the returned JSON sould be
{
"type" : "SUCCESS",
"msg" : "Container evaluation successfully deployed with module evaluation:evaluation:1.0.0-SNAPSHOT.",
"result" : {
"kie-container" : {
"container-id" : "evaluation",
"release-id" : {
"group-id" : "evaluation",
"artifact-id" : "evaluation",
"version" : "1.0.0-SNAPSHOT"
},
"resolved-release-id" : {
"group-id" : "evaluation",
"artifact-id" : "evaluation",
"version" : "1.0.0-SNAPSHOT"
},
"status" : "STARTED",
"scanner" : {
"status" : "DISPOSED",
"poll-interval" : null
},
"config-items" : [ ],
"messages" : [ {
"severity" : "INFO",
"timestamp" : {
"java.util.Date" : 1584976721934
},
"content" : [ "Container evaluation successfully created with module evaluation:evaluation:1.0.0-SNAPSHOT." ]
} ],
"container-alias" : null
}
}
2. Check the containers on kie-server
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http:
The response code should be "200 OK" and the returned JSON should be
{
"type" : "SUCCESS",
"msg" : "List of created containers",
"result" : {
"kie-containers" : {
"kie-container" : [ {
"container-id" : "evaluation",
"release-id" : {
"group-id" : "evaluation",
"artifact-id" : "evaluation",
"version" : "1.0.0-SNAPSHOT"
},
"resolved-release-id" : {
"group-id" : "evaluation",
"artifact-id" : "evaluation",
"version" : "1.0.0-SNAPSHOT"
},
"status" : "STARTED",
"scanner" : {
"status" : "DISPOSED",
"poll-interval" : null
},
"config-items" : [ ],
"messages" : [ {
"severity" : "ERROR",
"timestamp" : {
"java.util.Date" : 1584976886174
},
"content" : [ "Container evaluation already exists." ]
} ],
"container-alias" : null
} ]
}
}
3. Start new process instance
Run
curl -v -X POST -H 'Content-type: application/json' -u krisv:krisv -d '{"employee":"mark"}' http:
The response code should be "201 Created"
4. Check the instance
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http:
The response code should be "200 OK" and the returned JSON should be
{
"process-instance" : [ {
"process-instance-id" : 1,
"process-id" : "evaluation",
"process-name" : "Evaluation",
"process-version" : "1",
"process-instance-state" : 1,
"container-id" : "evaluation",
"initiator" : "krisv",
"start-date" : {
"java.util.Date" : 1584977214240
},
"process-instance-desc" : "Evaluation",
"correlation-key" : "1",
"parent-instance-id" : -1,
"sla-compliance" : 0,
"sla-due-date" : null,
"active-user-tasks" : null,
"process-instance-variables" : null
} ]
5. Return to Business Central and navigate to "Execution Servers"
The page says "sample-server This Configuration currently has no deployment units." The expected result should be the evaluation container is deployed on the server.
6. Logout from Business Central and shut down jBPM
7. Start jBPM again
8. Check the deployed containers
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http:
The responce code should be "200 OK" but the returned JSON does NOT show "evaluation" container:
{
"type" : "SUCCESS",
"msg" : "List of created containers",
"result" : {
"kie-containers" : {
"kie-container" : [ ]
}
}
The expected result should be similar to step 2 above
9. Try to check process instances on kie-server
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http:
The responce code should be "200 OK" and the returned JSON shows the instance created earlier
{
"process-instance" : [ {
"process-instance-id" : 1,
"process-id" : "evaluation",
"process-name" : "Evaluation",
"process-version" : "1",
"process-instance-state" : 1,
"container-id" : "evaluation",
"initiator" : "krisv",
"start-date" : {
"java.util.Date" : 1584977214240
},
"process-instance-desc" : "Evaluation",
"correlation-key" : "1",
"parent-instance-id" : -1,
"sla-compliance" : 0,
"sla-due-date" : null,
"active-user-tasks" : null,
"process-instance-variables" : null
} ]
How does this confirm with "no containers" in previous step?
10. Login to Business Central and navigate to "Process Definitions". The page states "No process definitions found"
11. In Business Central navigate to "Process Instances". The page shows the "evaluation" instace created earlier. Click on the instance to get the instance details. The error popup jumps out: "Error Unable to complete your request. The following exception occurred: "Unexpected error during processing: Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation' "."
12. Try to create another instance
Run
curl -v -X POST -H 'Content-type: application/json' -u krisv:krisv -d '{"employee":"mary"}' http:
The responce code should be "500 Error" and server.log gets new exception stack trace
09:55:22,773 ERROR [org.kie.server.remote.rest.jbpm.ProcessResource] (default task-13) Unexpected error during processing Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation': java.lang.IllegalArgumentException: Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation'
at org.kie.server.services.impl.KieServerRegistryImpl.getContainer(KieServerRegistryImpl.java:92)
at org.kie.server.services.impl.KieServerRegistryImpl.getContainerId(KieServerRegistryImpl.java:112)
at org.kie.server.services.jbpm.ProcessServiceBase.startProcess(ProcessServiceBase.java:87)
...
Show
Preparation
1. Install jBP from jbpm-server-7.33.0.Final-dist.zip
2. Start jBPM and login to Business Central as kris/krisv
3. Navigate to "Projects -> MySpace" and add sample application "Evaluation Process" to the space
4. Open the project and do "Build & Install:
5. Inspect BC's maven repository - evaluation-1.0.0-... jar and pom must be there
The problem
1. Deploy evaluation kjar onto kie-server
Run
curl -v -X PUT -H 'Content-type: application/json' -u krisv:krisv -d '{ "container-id" : "evaluation" , "release-id" :{ "group-id" : "evaluation" , "artifact-id" : "evaluation" , "version" : "1.0.0-SNAPSHOT" }}' http: //localhost:8080/kie-server/services/ rest /server/containers/evaluation
The HTTP response shoud be "201 Created" and the returned JSON sould be
{
"type" : "SUCCESS" ,
"msg" : "Container evaluation successfully deployed with module evaluation:evaluation:1.0.0-SNAPSHOT." ,
"result" : {
"kie-container" : {
"container-id" : "evaluation" ,
"release-id" : {
"group-id" : "evaluation" ,
"artifact-id" : "evaluation" ,
"version" : "1.0.0-SNAPSHOT"
},
"resolved-release-id" : {
"group-id" : "evaluation" ,
"artifact-id" : "evaluation" ,
"version" : "1.0.0-SNAPSHOT"
},
"status" : "STARTED" ,
"scanner" : {
"status" : "DISPOSED" ,
"poll-interval" : null
},
"config-items" : [ ],
"messages" : [ {
"severity" : "INFO" ,
"timestamp" : {
"java.util.Date" : 1584976721934
},
"content" : [ "Container evaluation successfully created with module evaluation:evaluation:1.0.0-SNAPSHOT." ]
} ],
"container-alias" : null
}
}
2. Check the containers on kie-server
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http: //localhost:8080/kie-server/services/ rest /server/containers
The response code should be "200 OK" and the returned JSON should be
{
"type" : "SUCCESS" ,
"msg" : "List of created containers" ,
"result" : {
"kie-containers" : {
"kie-container" : [ {
"container-id" : "evaluation" ,
"release-id" : {
"group-id" : "evaluation" ,
"artifact-id" : "evaluation" ,
"version" : "1.0.0-SNAPSHOT"
},
"resolved-release-id" : {
"group-id" : "evaluation" ,
"artifact-id" : "evaluation" ,
"version" : "1.0.0-SNAPSHOT"
},
"status" : "STARTED" ,
"scanner" : {
"status" : "DISPOSED" ,
"poll-interval" : null
},
"config-items" : [ ],
"messages" : [ {
"severity" : "ERROR" ,
"timestamp" : {
"java.util.Date" : 1584976886174
},
"content" : [ "Container evaluation already exists." ]
} ],
"container-alias" : null
} ]
}
}
3. Start new process instance
Run
curl -v -X POST -H 'Content-type: application/json' -u krisv:krisv -d '{ "employee" : "mark" }' http: //localhost:8080/kie-server/services/ rest /server/containers/evaluation/processes/evaluation/instances
The response code should be "201 Created"
4. Check the instance
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http: //localhost:8080/kie-server/services/ rest /server/containers/evaluation/processes/instances
The response code should be "200 OK" and the returned JSON should be
{
"process-instance" : [ {
"process-instance-id" : 1,
"process-id" : "evaluation" ,
"process-name" : "Evaluation" ,
"process-version" : "1" ,
"process-instance-state" : 1,
"container-id" : "evaluation" ,
"initiator" : "krisv" ,
"start-date" : {
"java.util.Date" : 1584977214240
},
"process-instance-desc" : "Evaluation" ,
"correlation-key" : "1" ,
"parent-instance-id" : -1,
"sla-compliance" : 0,
"sla-due-date" : null ,
"active-user-tasks" : null ,
"process-instance-variables" : null
} ]
5. Return to Business Central and navigate to "Execution Servers"
The page says "sample-server This Configuration currently has no deployment units." The expected result should be the evaluation container is deployed on the server.
6. Logout from Business Central and shut down jBPM
7. Start jBPM again
8. Check the deployed containers
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http: //localhost:8080/kie-server/services/ rest /server/containers
The responce code should be "200 OK" but the returned JSON does NOT show "evaluation" container:
{
"type" : "SUCCESS" ,
"msg" : "List of created containers" ,
"result" : {
"kie-containers" : {
"kie-container" : [ ]
}
}
The expected result should be similar to step 2 above
9. Try to check process instances on kie-server
Run
curl -v -X GET -H 'Content-type: application/json' -u krisv:krisv http: //localhost:8080/kie-server/services/ rest /server/containers/evaluation/processes/instances
The responce code should be "200 OK" and the returned JSON shows the instance created earlier
{
"process-instance" : [ {
"process-instance-id" : 1,
"process-id" : "evaluation" ,
"process-name" : "Evaluation" ,
"process-version" : "1" ,
"process-instance-state" : 1,
"container-id" : "evaluation" ,
"initiator" : "krisv" ,
"start-date" : {
"java.util.Date" : 1584977214240
},
"process-instance-desc" : "Evaluation" ,
"correlation-key" : "1" ,
"parent-instance-id" : -1,
"sla-compliance" : 0,
"sla-due-date" : null ,
"active-user-tasks" : null ,
"process-instance-variables" : null
} ]
How does this confirm with "no containers" in previous step?
10. Login to Business Central and navigate to "Process Definitions". The page states " No process definitions found "
11. In Business Central navigate to "Process Instances". The page shows the "evaluation" instace created earlier. Click on the instance to get the instance details. The error popup jumps out: " Error Unable to complete your request. The following exception occurred: "Unexpected error during processing: Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation' ". "
12. Try to create another instance
Run
curl -v -X POST -H 'Content-type: application/json' -u krisv:krisv -d '{ "employee" : "mary" }' http: //localhost:8080/kie-server/services/ rest /server/containers/evaluation/processes/evaluation/instances
The responce code should be "500 Error" and server.log gets new exception stack trace
09:55:22,773 ERROR [org.kie.server.remote. rest .jbpm.ProcessResource] ( default task-13) Unexpected error during processing Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation' : java.lang.IllegalArgumentException: Container 'evaluation' is not instantiated or cannot find container for alias 'evaluation'
at org.kie.server.services.impl.KieServerRegistryImpl.getContainer(KieServerRegistryImpl.java:92)
at org.kie.server.services.impl.KieServerRegistryImpl.getContainerId(KieServerRegistryImpl.java:112)
at org.kie.server.services.jbpm.ProcessServiceBase.startProcess(ProcessServiceBase.java:87)
...