Skip to content

Commit

Permalink
debugging info statements
Browse files Browse the repository at this point in the history
  • Loading branch information
brentjk committed Nov 14, 2023
1 parent a5df5ba commit 36f7377
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.camunda.bpm.engine.RepositoryService;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.repository.ProcessDefinition;
import org.python.jline.internal.Log;
import org.slf4j.Logger;

import de.ruedigermoeller.serialization.FSTObjectInput;
Expand Down Expand Up @@ -57,7 +58,10 @@ public void run() {

String procStartReqUuid = procReq.get("uuid").toString();
String procDefKey = procReq.get("proc_def_key").toString();


Log.info("Tag: " + "procStartReqUuid " + procStartReqUuid);
Log.info("Tag: " + "procDefKey " + procDefKey);

try {
long t0 = System.currentTimeMillis();

Expand Down Expand Up @@ -107,6 +111,7 @@ public void run() {
FSTObjectInput in = new FSTObjectInput(new ByteArrayInputStream(procVarsAsBytes));
Map<String,Object> procVars = (Map<String,Object>)in.readObject();
in.close();
log.info("Tag: " + "procVars" + procVars);
if (procVars == null) {
procVars = new HashMap<String,Object>();
}
Expand All @@ -125,8 +130,12 @@ public void run() {
procVars.put("procDefKey", procDefKey == null ? "unknown" : procDefKey);
procVars.put("startedOnWorkerId", workerService.getWorkerId());
// FUTURE WORK: Condense these into one JSON object (string) Do in v2.3

log.info("Tag: " + "procDefKey" + procDefKey);
log.info("Tag: " + "startedOnWorkerId" + workerService.getWorkerId());


String procBusinessKey = procReq.get("proc_business_key").toString();
log.info("Tag: " + "procBusinessKey" + procBusinessKey);
if (procBusinessKey == null) {
log.error("setting procBusinessKey to procStartRequeUuid because it was null. This should never be null!");
procBusinessKey = procStartReqUuid;
Expand All @@ -139,10 +148,11 @@ public void run() {
while (procInstId == null && waitTime < 5000) {

try {

log.info("Tag: Start process on this engine, and get process instance ID back "+ procInstId);
// Start process on this engine, and get process instance ID back
//
procInstId = runtimeService.startProcessInstanceByKey(procDefKey, procBusinessKey, procVars).getId();
log.info("Tag: procInstId "+ procInstId);
} catch (Throwable t) {
}

Expand Down

0 comments on commit 36f7377

Please sign in to comment.