Hello,
Short version: I need a way to reference and get properties of the current doc that a workflow is called on
Long version: I need to pull data from a workflow form (I already know how to do this) and then add custom metadata to a document using that data. I assume I need to use property groups? I found this code example from another forum post here:
Short version: I need a way to reference and get properties of the current doc that a workflow is called on
Long version: I need to pull data from a workflow form (I already know how to do this) and then add custom metadata to a document using that data. I assume I need to use property groups? I found this code example from another forum post here:
Code: Select all
My issue is with the first line:// Create new metadata
OKMPropertyGroup.getInstance().addGroup(token, doc.getPath(), grpName);
Map properties = new HashMap();
properties.put("okp:contract.cups",status.cups);
properties.put("okp:contract.year",gson.toJson(new String[] {status.year}));
properties.put("okp:contract.month",gson.toJson(new String[] {status.month.toLowerCase()}));
OKMPropertyGroup.getInstance().setPropertiesSimple(token, doc.getPath(), grpName, properties);
Code: Select all
Where does "doc" come from? How do I reference the current document after submitting a workflow form so that I can add this metadata?OKMPropertyGroup.getInstance().addGroup(token, doc.getPath(), grpName);