diff options
author | Plummer, Brittany <brittany.plummer@att.com> | 2020-02-06 11:26:19 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-02-06 11:26:19 -0500 |
commit | fdc8f787e9874f82409cdb2eae0475162d6519aa (patch) | |
tree | f6648e8ce7d476edb9e3c1fac2611e63f4920a79 /bpmn/mso-infrastructure-bpmn/src/test | |
parent | 422c2a3615ca059b2b9e79304738106fb845bf69 (diff) |
optimize camunda process instance history
Set buinessKey to requestId. Added plugin to pass businessKey to
subprocesses
Updated process-instance and activity-instance lookups to filter
response
Removed duplicate tests and updated att history lookup
Updated businessKey to be set to mso-request-id
Updated snapshot version to fix build issues
Removed query param from properties. added uribuilder
Updated to use uriBuilder.build().toString()
Updated unit tests to lookup by procesInstanceId to fix build failure
Issue-ID: SO-2650
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I357053c52a75ee5149a56392ce866dbb654b541d
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src/test')
-rw-r--r-- | bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 93f98a34a6..0161422b64 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -1534,6 +1534,18 @@ public abstract class WorkflowTest { } } + protected Object getVariableFromHistoryByProcessInstanceId(String processInstanceId, String variableName) { + try { + HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery() + .processInstanceId(processInstanceId).variableName(variableName).singleResult(); + return v == null ? null : v.getValue(); + } catch (Exception e) { + logger.debug("Error retrieving variable {} from historical process with processInstanceId {}: ", + variableName, processInstanceId, e); + return null; + } + } + /** * Gets a variable value from a process instance based on businessKey and process name. Must be used when multiple * instances exist with the same business key such as when business key is passed to subflows or shared across |