How to get a substring in a Workflow Activity?

I'm concatenating some values into a Summary field in a workflow activity as follows:
IIF(Eq([//Target/Code1],True),"1,","")+IIF(Eq([//Target/Code2],True),"2,","")+IIF(Eq([//Target/Code3],True),"3,","")
So if Code1 and Code2 are true I get a Summary Value of 1,2,
Now I want to trim the trailing comma.
So I did this
Left([//Target/Summary],Add(Length([//Target/Summary]),-1))
This part doesn't work.  It says Left is improperly formatted or missing a parameter.
If I put a numeric value like 1 or 2 as the second value it works.
 Any suggestions on how to get trim a character off the end of a string in a FIM Workflow activity?

Length isn't a function supported by the FIM Function evaluator Workflow activity. (Which is frustrating).
Here is my sloppy approach using the built-in tool (lots of nesting so if you need to do this for more than 3 conditions this grows out of control):
IIF(Eq([//Target/Code1],True),IIF(Eq([//Target/Code2],True),IIF(Eq([//Target/Code3],True),"1,2,3","1,2") ,IIF(Eq([//Target/Code3],True),"1,3","1") )
,IIF(Eq([//Target/Code2],True),IIF(Eq([//Target/Code3],True),"2,3","2") ,IIF(Eq([//Target/Code3],True),"3","") ))
OR you can use one of these custom workflows that allows you to run your own code:
http://fimwf.codeplex.com/
or
https://fimactivitylibrary.codeplex.com/wikipage?title=Code%20Run%20samples&referringTitle=Documentation
David Lundell, Get your copy of FIM Best Practices Volume 1 http://blog.ilmbestpractices.com/2010/08/book-is-here-fim-best-practices-volume.html

Similar Messages

  • How to get the faultcode in the catchall Activity

    I saw in the dev guide, where they have given, how to get the Faultcode in the Catch Activity of Fault Handler.
    Is there any way to get the faultcode while using CatchAll activity of Fault handler.
    Edited by: 909857 on Jan 24, 2012 2:22 AM
    Edited by: 909857 on Jan 24, 2012 2:25 AM

    Yes. Currently I am using the below to get the fault code
    substring-before(substring-after(ora:getFaultAsString(),'code=<code>'),'</code>')
    But I am looking for something similar to catch activity, where we can assign a faultvariable of message type bpelx:RuntimeFaultMessage. And we can get the faultcode from that faultvariable.
    I am looking, if there is any similar way for catchall activity.

  • How to get Owner's name in workflow and disable it?

    hai
    When i open any workflow process, by default the first page gives itemkey, user key, Process name and Process Owner attributes. But we can change the owner's name here. This allows the user to launch the process on behalf of another user. How to disable it so that the user can not change this?
    ( default it will the user who started the process). Also I want to get the owner's name in any fuction in between the process. How to get it? Pls help me.

    The Launch Process screen is only available for Workflow Administrators (set on the Global Preferences screen) and is typically used for testing workflows.
    hai
    When i open any workflow process, by default the first page gives itemkey, user key, Process name and Process Owner attributes. But we can change the owner's name here. This allows the user to launch the process on behalf of another user. How to disable it so that the user can not change this?
    ( default it will the user who started the process). Also I want to get the owner's name in any fuction in between the process. How to get it? Pls help me.

  • How to get the ItemKey for a Workflow triggered by an event in Oracle Apps

    Hello,
    I have added a custom sub process to the seeded "OM Order Header" workflow. The process sends a notification. There are a few attributes in the body of the message tied to this notification, to which I am trying to assign values to using the syntax:
    SetItemAttrText (itemtype, itemkey, attrname, attrvalue).
    I have the internal names for the item type and attribute name, but don't know how to get the value for the item key. I understand the item key is supposed to be unique for each item type and is automatically generated by the workflow engine when the work flow fires. Is there a built-in function or some means to get this value?
    Regards,
    Smita

    Have you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
    bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
    Thanks,
    Hussein

  • How to get task approver name in workflow

    I have created a workflow for document publish triage. The triage task is send to a group "Publishers", this group have multiple members. After the task is approved/rejected by someone, I need send mail to the task requester and tell
    the requester who approved/rejected this request?
    My question is that: how to get the approver's name? Which data source in the lookup is related to this?
    Best regards,
    Glen Qu (Fareast\v-zuqu)

    Try below:
    http://sharepoint247.wordpress.com/2013/05/24/handy-email-utility-for-any-sharepoint-project/
    interface IEmailConfigurationManager
    /// <summary>
    /// Gets Email Template by it's ID
    /// </summary>
    /// <param name="emailTemplateId"></param>
    /// <returns></returns>
    EmailTemplate GetEmailTemplate(string emailTemplateId);
    /// <summary>
    /// Gets Email Template by it's ID by updating the email template properties
    /// </summary>
    /// <param name="emailTemplateId"></param>
    /// <param name="subjectProperties"></param>
    /// <param name="bodyProperties"></param>
    /// <returns></returns>
    EmailTemplate GetEmailTemplate(string emailTemplateId,
    IDictionary<string, string> subjectProperties,
    IDictionary<string, string> bodyProperties);
    /// <summary>
    /// Add new email template.
    /// </summary>
    /// <param name="emailTemplateId"></param>
    /// <param name="emailTemplateSubject"></param>
    /// <param name="emailTemplateBody"></param>
    void AddEmailTemplate(string emailTemplateId, string shortDescription,
    string emailTemplateSubject, string emailTemplateBody);
    https://spemailutility.codeplex.com/
    http://social.msdn.microsoft.com/Forums/en-US/ef945d33-50c5-4b89-8bb9-32a95498b419/how-to-change-email-template-for-the-approval-workflow?forum=sharepointcustomizationlegacy

  • How to get jcr Session in the workflow?

    Hi,
    I'm using CQ 5.6 and I would like to know how we can get jcr seession in the workflow?
    API: com.adobe.granite.workflow.WorkflowSession;
      It doesn't have getSession() method as we have in com.day.cq.workflow.WorkflowSession.
    Any pointers would be helpful..
    Thanks
    Siva

    Adapt the workflowSession object to a JCR session.
    Session session = workflowSession.adaptTo(Session.class);

  • How to get component from which PropertyChange is activated

    I have a PropertyChangeListener on JInternalFrames. The frames are added using same method. I need to know from which component (frame) the 'close'-property is changed. I cannot figure out how to get it.
    When a propertychange is fired, how do i know from which componen (frame) it is fired?
    Common method to create frames is as follows:
             private void createPanel(JInternalFrame myFrame) {
            myDeskTop.add(myFrame);
                myFrame.pack();
            myFrame.setClosable(true);
                try {
                    myFrame.setMaximum(true);
                } catch (PropertyVetoException e){}
            myFrame.addPropertyChangeListener(new PropertyChangeHandler());
        }Code to execute handler is as follows:
        class PropertyChangeHandler implements PropertyChangeListener {
            public void propertyChange(PropertyChangeEvent e) {
              if (((String)e.getPropertyName()).equals("closed")){
                  if (myActiveApplication.equals("myPanelTestje")){
                      myPanelTestje = null;
                  if (myActiveApplication.equals("myFrameTestje")){
                      myFrameTestje = null;
                  if (myActiveApplication.equals("myHolidays")){
                      myHolidays = null;
                  if (myActiveApplication.equals("myInsurance")){
                      myInsurance = null;
            }

    Indeed no need to cast.
    When i click 'close' in the upper right corner of the JInternalFrame, the handler is executed and e.getPropertyName results in "closed". So, the correct property is activated but the problem was, how to detect from which JInternalFrame it was originated? The only way to find out from which panel the 'close'property is activated seems to be a test on the 'instance' (as in the example). Don't know if there is any way to check the panelname itself? It would be something like: e.getSource().getComponentName()
    class PropertyChangeHandler implements PropertyChangeListener {
    public void propertyChange(PropertyChangeEvent e) {
    if (e.getPropertyName().equals("closed")){
    if ((e.getSource() instanceof testApp)){
    myPanelTestje = null;
    if ((e.getSource() instanceof testInternalFrame)){
    myFrameTestje = null;
    if ((e.getSource() instanceof HolidayMenu)){
    myHolidays = null;
    if ((e.getSource() instanceof Insurance)){
    myInsurance = null;
    }If someone has a better way, please let me know. Otherwise consider this question closed.
    Thanks for the replies.

  • How to get the objects from a workflow item's container

    Dear all,<P/>
    We need to get the value of a variable in the container of a workflow item. I can get the workflow item list using function module <B>SAP_WAPI_CREATE_WORKLIST</B>. Then how can I get the corresponding container elements' value?<P/>
    I tried function mofule <B>SAP_WAPI_GET_OBJECTS</B>, but the returned table <B>OBJECTS</B> and <B>OBJECTS_2</B> are both empty.<P/>
    Thanks + Best Regards<P/>
    Jerome<P/>
    null

    Hi,
    Well, I think you will be getting the value as BORNAME:BORKEY. Get the KEYVALUE into your local variable. And use the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4acef453d11d189430000e829fbbd/frameset.htm">BOR Macros</a> to get the instance and desired contents.
    Regards
    <i><b>Raja Sekhar</b></i>

  • How to get host name in the workflow?

    Hi,
       I've a requirement where I need to get CQ Inbox url (http://<hostname>:<port>/inbox) in my custom workflow process. I thought of configuring url to some node and retriving from there.. but It's not the good approach as host name will be different for differnt CQ environments. So what is the best way of getting inbox url?
    Env: CQ 5.6
    Thanks
    Siva

    Yep Justin, If the configuration is wrong, any link generated would also be wrong.. I mean, default configuration will be some thing like..
    I mean, I can change those configurations as per my instance host name, right?
    Example: my instance's host url is:  mytest:1501
    So I would like to update the same in configurations ..

  • How to get Agents in Leave Approval workflow

    Hello Experts,
    I'm using Standard Workflow for Leave Approval i.e WS 00400077. Since it is Standard Workflow it should get the AGENT automatically. But when i execute ny Workflow and when i check in SWEL Workflow is Working Properly but It is showing
    " NO AGENT " is there. so i'm not getting Workitem in Inbox.
    So what should i do.
    Help me to solve this problem.
    Regards,
    Vardhan.

    Hello,
    "when i check in SWEL Workflow is Working Properly but It is showing  " NO AGENT ""
    Look in SWI1 instead and see if an agent has been assigned. In some cases "No Agent" can just mean it hasn't be executed yet.
    regards
    Rick Bakker
    hanabi technology

  • How to get high importance mail from Workflow

    Whenever the work item goes to Workflow inbox, parallelly the work item is going to Outlook as a mail.
    Now the problem is the mail should go with high importance indicator.
    Here the mail is triggering from "User Decision" step, not from the "Mail Step".
    we treid the step priority as 1, 2, 3 in the "Miscellaneous" tab in the User Desicion step, but its not working.
    I obseerved in other system (SRM) its working, but step priority is set as 0 under "Miscellaneous" tab in the User Decision step, generally we have 1-9.
    Is there any other settings need to be done? Pls let me know.
    Regards,
    Kishore.

    hi,
    You have to mark your Mail As EXPRESS mail.
    Then it will show as an Important mail and a prompt will be displayed as soon as mail reached the Inbox.
    Regards
    Sumit Agarwal

  • How to get the filename of the current active document in InDesign CS4?

    Hi,
    If I open a document from File->Open, I can get the document's file name using IOpenedFileInfo->GetOpenedFilePath().
    But, if I create a new document and perform File->SaveAs, GetOpenedFilePath is returning invalid IDFile reference.
    What is the right way to get the active document's file name?
    Thanks,
    VSP

    You can try this:
         IDatabse * db = ::GetDatabase(theDoc);
         IDFile *  sysFile = db->GetSysFile();
         PMString docName = sysFile->GetFileName();
    Good luck

  • How to get the label of the current active book or page

    response:
    response.getParameter("_pageLabel")
    Message was edited by gpedone at Sep 30, 2004 6:44 AM

    If within PageFlowController you can use corresponding backing context. However within jsp page, you need to use PresentationContext to get information about current book or page.
    Regards,
    Kail

  • Hints how to get a report for "number of active threads over time", e.g.?

    Hi there,
    We drive a number of WLS setups monitored using Grid Control 11g, and due to the usual economic aspects up to four WLS domains on a single system. To track the development of the load for each single domain we would like to have a report for the active threads, CPU e.g.. In the list of the pre-defined reports we can't find anything matching, so any hints for us based on someone's experience?
    TIA
    Oliver

    Hi Oliver,
    I would suggest you to have a look at the below WLST script which would give you the required report of the active threads and it would be send an email too.
    Topic: Sending Email Alert for Threads Pool Health Using WLST
    http://middlewaremagic.com/weblogic/?p=5433
    Topic: Sending Email Alert for Hogger Threads Count Using WLST
    http://middlewaremagic.com/weblogic/?p=5423
    Also you can use the below script in case of the stuck threads, this script would send you an email with the thread dumps during the issue occurred.
    Topic: Sending Email Alert For Stuck Threads With Thread Dumps
    http://middlewaremagic.com/weblogic/?p=5582
    Regards,
    Ravish Mody

  • How to get rid of icloud lock on activation screen

    bggg

    If the Device has iOS 7 installed... the passcode of the Apple ID the Device is registered to is required. Without this the Device will not work.
    Discussion:  >  https://discussions.apple.com/thread/5430340?tstart=0

Maybe you are looking for