diff options
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/Activity.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java index 38ed626..952a4dd 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java @@ -536,9 +536,12 @@ public class Activity extends WfVertex }
else
return null;
- } /**
- * Stores the request data as an outcome of the Item It does a great deal of storing outcomes in different configuration
- */ //requestdata is xmlstring
+ }
+
+ /**
+ * Stores the request data as an outcome of the Item It does a great deal of storing outcomes in different configuration
+ */ //requestdata is xmlstring
+
private String storeOutcome(int eventID, String requestData, boolean isError) throws InvalidDataException
{
EntityPath entityPath = getItemEntityPath();
@@ -546,7 +549,9 @@ public class Activity extends WfVertex throw new InvalidDataException("Empty outcome", "");
if (entityPath != null)
{
- String schemaType; int schemaVersion;
+ String schemaType;
+ int schemaVersion;
+
if (isError) {
schemaType="Errors";
schemaVersion=0;
@@ -596,12 +601,13 @@ public class Activity extends WfVertex {
int eventID = -1;
String schemaType = (String) getProperties().get("SchemaType");
- boolean hasOutcome = (transitionID == Transitions.DONE || transitionID == Transitions.COMPLETE || transitionID == Transitions.SUSPEND) && (schemaType != null && schemaType.length() > 0);
+ boolean hasOutcome = (transitionID == Transitions.DONE || transitionID == Transitions.COMPLETE) && (schemaType != null && schemaType.length() > 0);
+ boolean hasErrorOutcome = transitionID == Transitions.SUSPEND && requestData != null && requestData.length()>0;
Event event = auditEvent(transitionID, agent, hasOutcome);
if (event != null)
eventID = event.getID();
- if (hasOutcome)
- storeOutcome(eventID, requestData, transitionID == Transitions.SUSPEND);
+ if (hasOutcome || hasErrorOutcome)
+ storeOutcome(eventID, requestData, hasErrorOutcome);
EntityPath entityPath = getItemEntityPath();
TransactionManager storage = Gateway.getStorage();
if (entityPath != null)
@@ -609,6 +615,7 @@ public class Activity extends WfVertex storage.commit(this);
}
}
+
public void pushJobsToAgents()
{
String agentRole = getCurrentAgentRole();
|
