cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1743
Views
1
Helpful
15
Replies

Approval Email Default Objects?

guthrie
Level 4
Level 4

It's well known that ctxt, util and logger are available in workflows but what about Approval Emails?  By example, ctxt is not.

018-03-01 04:15:20,884 [WFExec-4063-1] ERROR generateEmailNotificationOnDefaultTemplate(ApprovalEmailSender.java:1055) - Error in generate email

javax.script.ScriptException: ReferenceError: "ctxt" is not defined in <eval> at line number 108

    at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)

By tearing apart the "User Approval Workflow", I have gathered the details below but I am wondering if someone else has more?  I would like to pull in other workflow details into the approval emails but the particulars of what is available in the email approval environment seem a little scarce.

request: com.cloupia.lib.util.emailtemplates.EmailGenerationRequest

-    I cannot find references in cucsd-open-auto-sdk-javadocs-6.5.0.0

request.getDataObject(): com.cloupia.lib.util.emailtemplates.wrappers.EmailContentForWorkflowWrapper

-    I cannot find references in cucsd-open-auto-sdk-javadocs-6.5.0.0

request.getDataObject().getSettings(): com.cloupia.model.cIM.MailSettings

     Documented in: cucsd-open-auto-sdk-javadocs-6.5.0.0/com/cloupia/model/cIM/MailSettings.html

request.getDataObject().getObjects().getWorkFlow(): com.cloupia.model.cIM.WorkFlow

     Documented in:  cucsd-open-auto-sdk-javadocs-6.5.0.0/com/cloupia/model/cIM/WorkFlow.html

request.getDataObject().getObjects(): com.cloupia.service.cIM.inframgr.workflowmgr.WorkFlowObjects

-    I cannot find references in cucsd-open-auto-sdk-javadocs-6.5.0.0

api: com.cloupia.lib.util.emailtemplates.EmailTemplateAPIFunctions

-    I cannot find references in cucsd-open-auto-sdk-javadocs-6.5.0.0

Using the launch Interpreter I see the following:

var a = new com.cloupia.lib.util.emailtemplates.EmailGenerationRequest;

> printObj(a);

properties = com.cloupia.lib.util.emailtemplates.EmailGenerationRequest

  definition=,dataObject=,requestTime=Mar 01, 2018 03:10:43 UTC,templateId=,subjectDataObject=,templateName=]

  methods = setSubjectDataObject getDataObject getSubjectDataObject getDefinition setTemplateId getTemplateId setRequestTime getRequestTime setDefinition setTemplateName getTemplateName setDataObject

var g = new com.cloupia.lib.util.emailtemplates.wrappers.EmailContentForWorkflowWrapper;

  > printObj(g);

  properties = com.cloupia.lib.util.emailtemplates.wrappers.EmailContentForWorkflowWrapper

    [settings=,objects=,customDefinition=,entryId=0,handlerApproval=-1,currentStepIndex=0,handlerSubmission=-1]

    methods = getCurrentStepIndex getObjects setCustomDefinition getHandlerApproval getHandlerSubmission getCustomDefinition getEntryId setEntryId setSettings getSettings setObjects setHandlerApproval setHandlerSubmission

var c = new com.cloupia.service.cIM.inframgr.workflowmgr.WorkFlowObjects;

> printObj(c);

properties = com.cloupia.service.cIM.inframgr.workflowmgr.WorkFlowObjects

  [workFlow=,servcieRequest=,group=,vdc=,catalogItem=,submittingUser=,currentUser=,approvers=[],primaryApprovers=[],secondaryApprovers=[],trigger=]

  methods = getSubmittingUser setCatalogItem setSubmittingUser setCurrentUser getGroup getWorkFlow getCurrentUser getApprovers setApprovers getPrimaryApprovers setPrimaryApprovers getSecondaryApprovers setSecondaryApprovers setVdc getVdc setGroup getCatalogItem setServcieRequest setTrigger setWorkFlow getServcieRequest getTrigger

var d = new com.cloupia.lib.util.emailtemplates.EmailTemplateAPIFunctions;

> printObj(d);

properties = com.cloupia.lib.util.emailtemplates.EmailTemplateAPIFunctions

  []

  methods = getUserData getString getString getDate getVMVNicList sanitizeHtmlText getVMTerminationTime getNextRechargeDate formatTime getIp getVMList

15 Replies 15

Here is an example of if 8 CPU’s are selected then get approval

https://communities.cisco.com/docs/DOC-65844

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer