WorkFlow Syntax

Hi All,
I have a requirement, where I need to check between the opportunity owner role and the current user's role who is accessing the opportunity. If there is a mismatch I have updated a field which will eventually set a validation.
The condition which I gave under the workflow "Before modified workflow" under opportunity object is as below and its working
(Left(JoinFieldValue('<User>',JoinFieldValue('< Opportunity >',[<OpportunityId>],'<OwnerId>'),'<Role>'),2) = 'AA') AND (Left(UserValue('<Role>'),2) <> 'BB')
I also tried (Left(JoinFieldValue('<User>',[<OwnerId>],'<Role>'),2) = 'AA') AND (Left(UserValue('<Role>'),2) <> 'FM') but this did not work for some reasons.
I have two questions from here
1. Is my syntax (the one mentioned as working) correct as per syntax standards.
2. Along with my working condition I need to check if other fields was also changed (like owner). When I add (PRE('<Owner>') <> [<Owner>]) to above condition it doesnt seem to work.I am not sure if I can use PRE under "Before modified record" condition.Please clarify.
Please confirm if there is an effective way to get this requirement.
Thanks
Natraj

Hi Bluesh,
I have checked the tutorial that you have posted in the link. Before anything else, when you put a decision step you should have a task with it you can copy standard decision task 8567 for your workflow.
Then set-up your binding properly, trigerring events and agent for your task, you could also use wf-initator for this one for your test. Classify the task as general task by going to the task -> agent assignment then attibutes -> general task.
Then when all of these are set-up try executing your workflow and it should work fine, and if problems persist there are many postings you could select in the OSS (service.sap.com) use the keywords in your dump file and pick your situation in the OSS.
Cheers,

Similar Messages

  • Workflow syntax error

    Hi Gurus,
    I have developed a simple Workflow and when I execute it I get the following dump. The workflow is just that ask whether you want to continue and lets them respond "Yes" or "No"
    below is the link for the tutorial i am trying
    http://****************/Tutorials/Workflow/WorkflowTutorialOne/WorkFlowTutorial1.htm
    The following syntax error occurred in the program                       
    CL_SWF_RUN_WIM_LOCAL==========CP :                                      
    "You can only define attributes in the PUBLIC, PROTECTED or PRIVATE sec" 
    Error in ABAP application program.                                                                               
    The current ABAP program "CL_SWF_RUN_WIM_FACTORY========CP" had to be    
    terminated because one of the                                           
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.                                                                               
    Any help will be appreciated and awarded.
    Thanks,
    Bluesh

    Hi Bluesh,
    I have checked the tutorial that you have posted in the link. Before anything else, when you put a decision step you should have a task with it you can copy standard decision task 8567 for your workflow.
    Then set-up your binding properly, trigerring events and agent for your task, you could also use wf-initator for this one for your test. Classify the task as general task by going to the task -> agent assignment then attibutes -> general task.
    Then when all of these are set-up try executing your workflow and it should work fine, and if problems persist there are many postings you could select in the OSS (service.sap.com) use the keywords in your dump file and pick your situation in the OSS.
    Cheers,

  • Workflow based on created date field in opportunity?

    Hi All,
    Can we write a workflow based on created date field in opportunity that if a opportunity record has not been modified after say 90 days,what will be the workflow syntax.
    I just want an email notification to owner and owner's manager.
    Thanks in advance,
    Manish.

    I think you can use the WAIT workflow using Duration('P90D') then Send Email, triggering it upon save and upon modification. Make sure that the Re-evaluate Rule Conditions After Wait option is checked so that the previous WAIT would be reset upon modification.
    Edited by: marcocollado on Aug 31, 2012 5:57 AM

  • Workflow issue on Sales Stage

    Hello: Hoping I can get some help with Workflow syntax
    Premise: Every time a sales stage is updated (except for when the opportunity is closed/lost or closed inactive) we copy that stage into a field called Last Stage. This way we can generate reports on what stage the opportunity was at before it was lost or inactivated - management and marketing can use this info to determine new sales strategies/campaigns etc.
    Here's what I've come up with:
    Workflow Name     Opty: update last stage     
    Record Type     Opportunity
    Active          
    Trigger Event     Before modified record saved          
    Workflow Rule Condition     [<SalesStage>] <> "Closed/Lost" OR "Closed/Inactive"
    Action      
    Field Name     Last Stage     
    Value          [<SalesStage>]
    Overwrite Existing Values     checked
    This workflow is working in that it does update the last stage field with the sales stage except if Closed/lost
    however ... when I select Closed/Inactive it overwrites the Last stage with Closed/Lost
    Again expressions are not my strong suit, if you could assist in pointing out the error of my ways, I'd be eternally grateful
    Cheers
    K

    Not sure I understand - I don't think the previous condition is relevant here. What I needed to happen is for the sales stage to be copied to last stage in every instance - except if the stage is Closed/Lost OR Closed/Inactive - if it is closed/lost OR closed/inactive I don't want it to update.
    If you still think it is a Pre condition that I need, could you please assist with helping me with the syntax? None of my muddling produced any that would pass the syntax test anyway.
    Thanks
    K

  • Check BPM

    Hey guys
    i m doin a file to RFC scenario using BPM and getting some error in containers(return code 99 in SXI_CACHE),is it possible to check the BPM for any errors,i know i can check for syntax but i want to test BPM on the whole
    i m using SP9.
    thanx
    ahmad

    1) some times generated work flow can have syntax errors. please do workflow syntax check using transaction swdd----> WorkFlow -
    > Check Syntax
    2) click on repeat activation from SXI_CACHE to get the updated version of runtime workflow
    3) turn on trace for BPM using transaction code, SWELS
    4) run the interface again, and check in SXMB_MONI_BPE

  • Specific Due Date Syntax for Create Task Workflow Action

    I'm looking for a formula which will create a monthly due date on a specific day of the month (ie 1st or 15th). I have figured out a way to create recurring activities through workflows by adding a recuurence picklist but I currently only have monthly recurrences as Today()+30 which works but is not as clean as a monthly task that occurs on the 15th of every month.

    Record Type=Activity
    Event=When modified record saved
    Workflow condition=FieldValue('<Type>')='To Do' AND FieldValue('<plRecurrence_ITAG>')='Every 30 days' AND FieldValue('<Status>')='Completed'
    Actions=Create Task
    Recurrence picklist is a required field and is chosen be the end user upon creation of the original activity (Type=To Do). The duplicate activity is created upon completion (see condition) and now the end user has a recurring task due 30 days out. this future task has the recurrence in the subject (since the recurrence field cannot be defined in the workflow action) and the end user is prompted by the system to complete the activity record (choose a recurrence) upon trying to save the record as complete or by clicking the "Mark as completed" button. Thus the cycle is repeated.
    All I'm trying to figure out is instead of having the formula [<DueDate>]+30 in the Due Date* field within the create task workflow action, I'd like a formula that can choose a specific day of the month. I've tried combinations of cast, concat, timeframe, month, year...expressions to give me the date value I'm looking for (ie 4/15/2011) but I can't get the syntax to work. all I need is that syntax that can provide a specific date (4/15/2011) derived from the due date.

  • Workflow XML R/3 can't parse XML answer, need help for syntax

    Hello all,
    i got a serious problem with workflow XML. I's a lot of text.
    What do we do:
    In worflow for PR's, there is a web activity, that sends out informations to a domino server. Sending out and receiving the acknowledgement works. The web activity than waits, until a answer comes in.
    Now, if the domino user releases or rejects the PR, domino sends a XML message to R/3. This message is the big problem!!
    R/3 documentation is not clear in this case. The R/3 example shows this syntax
    <?xml version="1.0" ?>
    <WfMessage Version="SAP.1.0">
    <WfMessageHeader>
      <Request>
       <ResponseRequired>Yes</ResponseRequired>
      </Request>
        <Key>http://www.xyz.com/SAP/BC/WORKFLOW_XML/?protocol=01&localkey=000000111669</Key>
        <Operation>ProcessInstanceStateChanged</Operation>
    </WfMessageHeader>
    <WfMessageBody>
      <ProcessInstanceStateChanged>
        <Key>http://www.xyz.com/SAP/BC/WORKFLOW_XML/?protocol=01&localkey=000000111669</Key>
        <ProcessInstanceKey>http://www.xyz.com/SAP/BC/WORKFLOW_XML/?protocol=01&localkey=000000112625</ProcessInstanceKey>
       <State>closed.completed</State>
       <ResultData>
         <ANSWER>test successful</ANSWER>
       </ResultData>
      </ProcessInstanceStateChanged>
    </WfMessageBody>
    </WfMessage>
    Link to the example:
    http://help.sap.com/saphelp_47x200/helpdata/de/54/de9e3887d6174fe10000009b38f842/frameset.htm
    In that case, the "key" tag points to the external system, but has an "localkey" parameter, that holds the R/3 instance of the workflow task. "ProcessInstanceKey" seems to be the key for the external system. Completely confusing!!
    Whenever we build our XML message in that way, we got the error 104 which means, that a process state change from [blank] to [blank] is not foreseen.
    Can anybody help further?
    Is there any document, that describes clear, how to build up such answer messages in WF XML?
    Thanks in advance for the answers!!
    Cheers
    Jens

    Hi Martin,
    thank you for your reply!
    Unfortunately, there is no way, to generate the incoming answer, because it comes from a domino server, who has implemented it through raw coding&MS XML. The only way to generate would be, to implement a workflow call from
    Domino to R/3, but i think in this case, it will consume to much time and R/3 documentation seems to be definitely wrong.
    Just have a look: abc.com is the WF-Initiator, xyz.com the consumer, localkey from abc.com is a part of xyz.com and the target in that case must be abc.com with this localkey.
    I studied the Wf-XML specification and, allthough it uses a different dialect (1.1), it seems to be, that the Key-Tag and ProcessInstanceKey-Tag are wrong in R/3 documentation. The error codes thrown in our implementation are 104 in the XML response and 200 in HTTP response, so this indicates a wrong key-value.
    We just want to implement a short test scenario, to proof our thing working, but my customer and the Domino developer are houndreds of miles away and time becomes very short from all sides. Every change on side of Domino seems to be a very complicated task and the developer wants a exact example of how to implement the interface, which i can't deliver ad hoc. Trial&error is a very bad idea in this case..
    OSS call is opened now, hope, they respond quickly, because i only can set the call to middle priority, no production - but development stop.
    Cheers
    Jens

  • Correct workflow condition syntax?

    Which of these two workflow conditions is correct?
    a)      (Left([<Owner>], 3) = "952")
    or
    b)     (Left([<Owner>], 3) = 952")
    Both check out as far as syntax is concerned. b) was in place up until a few minutes ago, but I'm wondering whether conditions like it throw off workflow actions by acting on the value of PRE('Owner') instead of the one that's been changed.

    We have workflows in place that are designed to assign an account to a book based on the first 3 characters of the value updated in the Owner field. For example, if the owner is 953000, the workflow action should assign the account to the 953 book.
    What appears to be happening is that it's being assigned to a Book that matches the 3-character string associated with the PREVIOUS owner. For example. I have a record whose owner is 174000. If I set the owner to 953000, the Book designation remains unchanged. If I then set the owner to 999999, the Book designation then changes to the 953 book.

  • Siebel & "BIP Report Generation" Workflow and Bookmark Syntax

    IHAC that wants to schedule the generation of a BIP report to run every weeknight and include a list of activities for the next day. We've utilized an OOTB IO and can successfully render the report using Sample XML in MS Word. Additionally, since they are only on 8.1.1, they do not currently have access to the latest scheduling capabilities. Therefore, we're trying to implement a repeating component to call a workflow to generate the report using the 'BIP Report Generation' workflow and the associated objects (from support posting 823360.1).
    Now to the questions:
    One of the parameters for the workflow is a 'Bookmark'. This parameter does not appear to handle various 'Siebel' querying functions like 'Today()' as part of the criteria. Can someone confirm this statement?
    Currently, I can imagine one high-level possible workarounds. This would entail a revised WF and that includes a prior step to generate the 'Bookmark' by retrieving a string representation of tomorrow's date and concatenating it with the rest of the criteria.
    Next question:
    Does anyone have any other possible alternatives? Maybe a calculated field in the BC/IC for 'Today() + 1' - but this could have performance implications.
    Thanks in advance for any help.

    Suggestions/comments?
    Bump.

  • How to read the "Name" field from document library in workflow?

    Hi,
    The task I'm trying to accomplish looks pertty simple: I need to read a value of the item's "Name" field inside the workflow. I try to do it using LookupSPListItem and GetDynamicValueProperties activities. I can get value of the "Title"
    field, also I created custom field and can read it too.
    But the "Name" field always comes empty.
    I guess I need to use some tricky syntax or this field has some different "internal name"?
    The workflow is designed in VS 2013.

    Thank you. Looks correct, since when I enter this path (FileLeafRef) into GetDynamicValueProperties
    and change Entity Type to list of documents it changes to Name
    automatically.
    But somehow it doesn't work too. (:
    I also tried LinkFilenameNoMenu and LinkFilename
    - same result.
    EDIT: Solved. :)
    Looks like FileLeafRef is not loaded by default by LookupSPListItem, so you have to pass this property name via
    Properties collection. The bad news is that in this case other properties won't be loaded if you didn't add them to this collection.
    Anyway, it works. :)

  • CcBPM - can't activate workflow when using expression in Condition editor

    Hi,
    My workflow (generated by ccBPM) won't be activated when I try to do an IDOC comparison (on DOCNUM), using an index (count), in the ccBPM Condition Editor.
    The condition looks like this:
    (msgs_receive[count]./HRTRPR01/IDOC/EDI_DC40/DOCNUM = msg_receive./HRTRPR01/IDOC/EDI_DC40/DOCNUM)
    There seem to be no errors when activating the Integration Process in the Integration Repository, however when looking into the SXI_CACHE, XI Directory cache, my integration process gets return code '99', even after reactivation.
    I get this error:
    Syntax error in expression Line1 Ext. IDE63443806B4211DBC393F1DE0ACE61FE
    The exception occurred (program: CL_SAI_SWF_RULE
    Symbol 'CE/KO' expected at position 1 in expression 'count{XSDSIMPLE::xsd:string;}'
    The only interpretation I make out of this is that it doesn't like my index (count) variable.
    Can anything be done to fix this?
    I use XI 3.0 SP14
    Thanks
    Olof Trönnberg

    Hi,
    Return code - 99
    1) Export  parameter might be wrong.
    2) Check Oss Notes 901366 & 708338.
    3) 99 occurs when there is a mismatch in the mapping
    4) 99 occur if all the active correlations are not used.
    5) Try this SXI_CACHE select your business process and
       click on activate. change the  the return code to 02
       and upon activating again.
    This will help you :
    http://help.sap.com/saphelp_bw31/helpdata/en/c6/893bca449311d1893e0000e8323c4f/content.htm
    Regards
    Agasthuri Doss

  • Error while transporting the workflow object

    Hi all,
    Please be informed that while i transported the workflow changes to test system i encountered the sy-subrc 8 error as stated in below screen shots.

    Hi Ranjith
    Seems that the transport error is showing that your ID has locked the Workflow (user REDDYRAN).
    Can you do a syntax check of the workflow transported in this transport - in pftc and swdd? Do we get any error?
    Also see if you can execute FM SWD_WFD_REPLICATE_FROM_9999 in Quality (in SM37)  - provide the IM_TASK = WSxxxxxxxx (your workflow number).
    regards,
    Modak

  • Import a Workflow using an XML file in Tcode SWDD

    Hello,
    I have a problem in the workflow builder- Tcode SWDD:
    I am trying to copy workflow from one system (ECC 5.0) to another one (ECC 6.0) ? I use transaction Workflow-> Import/export->Export to xml files and import the xml files again, but the new workflow is different from the original one. The steps do not have the same numbering and the Workflow graphic is far from being identical to the old one.
    Could someone explain me the reason of this problem in detail and how it could be solved? It's really a big workflow and would need to avoid creating it manually.
    Thank you very much for your help.
    Best regards,
    Sylvain

    Hello,
    The main problem that I had with the steps is that most names were not the same as the old Workflow. Instead of having the correct description I had some coding commands which created a bunch of errors when I tried to perform the syntax check.
    I believe you are right. In the new system (ECC 6.0) I do not have the Business Engineering objects like the tasks "TS....". I will create them first and try the Workflow import again after.
    I will let you know if it corrected the error or not.
    Best regards,
    Sylvain

  • BPM workflow not able to reflect the latest changes done.

    Hi.
    I've a BPM instance in QA which got logically deleted after entering into exception block .
    Now i've made necessary modifications (removing a loop and adding a Switch) in DEV and transported to QA (Repository) successfully. Now QA repository has the latest version of BPM.
    Now in QA, I've manually triggered the BPM from http-client and i couldn't see the latest version of BPM in the workflow (PE adapter in SXI_MONITOR). I could only see the older version (with Loop) and hence it again went into exception block. I tried triggering thrice but in vain.
    Where am i wrong? Do i need to transport the BPM in DEV Directory to QA Directory in order to reflect the change that i did?
    Kindly provide ur inputs.
    Thanks.

    Hi
    I have cheked SWF_XI_CUSTOMIZING, Maintain Runtime Environment is in red-cross mark.
    I have performed automatic workflow customizing. Now everything is in green check mark.
    Still my IP was in state 99 in sxi_cache.
    But...
    When i click my IP and click "Activation log" there i saw some warnings and 1 error.
    To know more details on the error, i clicked "Display active version" and click "Syntax check" (Ctrl+F2)
    Click on the error and we will be directed to the location where the error is.
    I have rectified the error. (Error is related to improper usage of container variable)
    I have activated the IP in DEV, transported to QA and checked SXI_CACHE.
    For my surprise it's still 99! But i couldn't see namespace and repository name for my IP. I thought the cache is getting updated.
    I had performed complete cache refresh and delta cache refresh.
    Phew.., now my IP is in State 0
    I had checked "Display active version" and it shows the latest version of IP.
    Again I've stated manual triggering of IP thru http-client and this time it took the latest version.
    Conclusion:
    There is no need to import the IP again and again into ID
    Check "Display active version" in SXI_CACHE before going to test IP.
    After transport, wait for a while for the system to update the cache. If it's taking time, refresh cache manually.
    Thank you all for your valuable inputs and time.
    ~Praveen.

  • Using Role as WF Admin for a specific workflow - Reg

    HI All,
    I am trying to define a WF Admin for a specific workflow. I know we can maintain a USER ID or EXPRESS(WFsyst-agent) or Rule for this in the Version Dependent tab of Basic Data for wflow template.
    But, when i give a Role(Custom R:XXXXXXX role), and do the syntax check, it is giving me the following error and am not able to proceed further.
    "Organizational object 'R:PR044_TRAVEL_MANAGER' not available".
    My guess is the agent that you give here should be an Org. Obj. For ex., when we specify a USER ID, then the Admin for this witem is shown as "ORGUSXXXXX" and similarly when we assign this custom role, may be it is trying to find if this role is an org. obj (which is obviously not) and hence the error.
    Have any of you tried this ROLE option here and can you pl explain me what is wrong with my setting.
    I'd appreciate your quick response as this is very critical for me.
    Thanks in advance.
    venu

    Mike,
    I thought i had solved it. But, when i am trying now with a role "RXXXXXXX" that is 14 char, its not working again.
    Can anybody tell me if there is any limitation on the role name (should start with Y or Z) or char length (14 char or 12..).
    Your immediate response is greatly appreciated.
    ========
    Hey, i just foudn that its the limitation with 12 char ..not Y or Z..and also found this OSS note 860251. It discussed the issue, but not a solution other than choosing a 12 char length for Role name.
    Anybody, any ideas ?
    Thanks in advance,
    venu
    Edited by: Venugopal Jogi on Jul 14, 2008 6:07 PM

Maybe you are looking for