Skip to content

Commit

Permalink
fix for issue #858
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrojdeCTL committed Aug 26, 2020
1 parent e354e29 commit 72c234a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.centurylink.mdw.model.variable;

import com.centurylink.mdw.cache.asset.PackageCache;
import com.centurylink.mdw.model.Jsonable;
import com.centurylink.mdw.model.workflow.Package;
import com.centurylink.mdw.translator.DocumentReferenceTranslator;
Expand Down Expand Up @@ -98,6 +99,8 @@ public String getStringValue(Package pkg) {
return value;
if (data == null)
return null;
if (pkg == null)
pkg = PackageCache.getMdwBasePackage();
value = pkg.getStringValue(type, data);
return value;
}
Expand All @@ -112,6 +115,8 @@ public Object getData(Package pkg) {
return this.data;
if (value == null)
return null;
if (pkg == null)
pkg = PackageCache.getMdwBasePackage();
data = pkg.getObjectValue(type, value);
return data;
}
Expand All @@ -127,6 +132,8 @@ public boolean isDocument(Package pkg) {
return false;
if (!value.startsWith("DOCUMENT:"))
return false;
if (pkg == null)
pkg = PackageCache.getMdwBasePackage();
return pkg.getTranslator(type) instanceof DocumentReferenceTranslator;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.centurylink.mdw.sync;

import com.centurylink.mdw.cache.asset.PackageCache;
import com.centurylink.mdw.model.variable.VariableInstance;
import com.centurylink.mdw.model.workflow.Package;
import com.centurylink.mdw.util.log.LoggerUtil;
Expand Down Expand Up @@ -60,6 +61,11 @@ public SyncExpressionEvaluator(Package pkg, String[] syncedActivityIds,
this.syncExpression = getDefaultSyncExpression();
else
this.syncExpression = syncExpression;

if (pkg == null)
this.pkg = PackageCache.getMdwBasePackage();
else
this.pkg = pkg;
}

/**
Expand Down

0 comments on commit 72c234a

Please sign in to comment.