7 Replies Latest reply on Aug 7, 2009 4:42 AM by Marc Victor

    How to use 'inputevent'?

      Share This:

      I want to run a workflow triggered by an event from BEM, then annotate the Notes of the Event with some text.


      The best I can get from the document is "To use the data from the Monitor Adapter Event in the triggered process, you must
      create an Input Parameter named 'inputevent' on the Start activity of the process.". Ok ... that was the easy bit.


      So, how now do I use a slot such as the mc_ueid later in the Event Update to send a Notes entry?


      Do I need to Assign slot values to context (Dynamic?)? Can I use the <mc-ueid> directly in the <items> somehow?

        • 1. Re: How to use 'inputevent'?
          Richard De Vries

          Hello Marc,


          I am actually working on something very similar to this.


          Ok, I am doing the following.


          a) on the "start", I created an Input Parameter called "inputevent" with a context name of "inputevent".


          b) I think linked the start to an Assign


          c) On the assign I am "assigning" several context items. For instance, one of the assigns I am setting is based on a slot name called "mc-smc-id". To do this, I did


               1) click on add row (green plus)

               2) Input Parameter Type = Context Item

               3) Name = inputevent (ctx)

               4) Output Context Type = Context Item

               5) Output Context Name: SMC-ID

               6) In the "transform" I choose a "Basic Transform" with 2 function sequences:

                         a) Element name matches: mc-smc-id

                         b) XML to Text


          From that point on you have a Context Item called "SMC-ID" with the value of the mc-smc-id slot.


          I am doing something similar for a couple other slots.


          Let me know if that makes sense.





          • 2. Re: How to use 'inputevent'?

            Hi Richard,


            I have done some similar work in the mean time.


            I have set ‘inputevent’ in Start and mapped the Module Configuration RBA-AD-BMC_Event_Manager:BMC_Event_Manager:id to a context (Event_ueid) in Assign. Now I’m using the Annotate Event module to send information to the Notes slot of the event, but I cannot get to define the context (Event_ueid) in the XML:




            <value>Annotating an event Notes slot</value>






            ========== This is the part where I need to refer to the original event mc_ueid =========

            <value><xsl:value-of select="{$Event_ueid}" /></value>

            ========= This doesn't work. When you try to Save you get "Error parsing XML" =======





            So, all I need to know is the correct syntax to refer to the context. (I tried the transform Basic and Adv with Token stuff, but alas not my cup of tea)


            Can you copy-n-paste the portion of your XML where you reference the SMC-ID.





            • 3. Re: How to use 'inputevent'?
              Richard De Vries

              I am not actually trying to update anything and as such not trying to build an XML request of sorts like you appear to be doing. So I don't actually have an XML I can give you.


              But ...


              Do you still have your "advanced" xslt transformation? If so, could you click on the "Source" tab and copy n paste it into a message. Perhaps I can try to help you figure it out that way.



              • 4. Re: How to use 'inputevent'?

                Hi Richard,


                I have nothing useful from the transform. I was 'playing' around to see if I can figure out how the tool works. Needless to say I'm still nowhere using Adv Transforms ... 8-( ... must go on training.


                In my search to find the correct syntax, I used an Operator Dialog and added a  context to the Description. The resulting code being:

                            <input required="false">

                So I added that to the <value> tag of  ID:

                            <input required="false">

                But looking at the log file on the AP when it  processes the Adapter Request, it appears exactly as above, as if the text  between the <value> tags are treated a plain text..
                This has been a  consistent result of all my different syntax attempts and I always thought that  the syntax could not substitute the actual value of the context. Now I'm  inclined to believe that no processing is allowed between these tags.


                I'm no XML, Xpath, etc guru, so it looks like I'm going to battle with this one for a while.



                • 5. Re: How to use 'inputevent'?
                  Jon Thomas

                  In the advanced transform editor, on the token (or text) element that you need to uncheck the disable output escaping button.

                  • 6. Re: How to use 'inputevent'?

                    Hi Jon,


                    This is a screenshot of how I've added the context to the XML of the Annotate Event module.


                    Context Icon.bmp


                    The XML is from the sample in the BEM Adapter Guide. The EventID context shown does have a valid mc-ueid that is extracted from inputevent.

                    Using as this the code gets so stuffed up that the process log eventually shows:

                    "22 Jul 2009 14:19:29,166 [Current Time=Wed Jul 22 14:19:29 GMT+02:00 2009] [Process Name=:RBA-AD-BMC_Event_Manager:Utilities:Update:Update Criteria Error Reporting] [Root Job Id=8b3663b80596767d:-5b39595b:121f278bda1:-7ff62-1248265168275] [Job Id=8b3663b80596767d:-5b39595b:121f278bda1:-7ff62-1248265168275/:POC:Clean FileSystem zLinux:start:call-process[2]/:RBA-AD-BMC_Event_Manager:v7.3:Update:Annotate Event:start:switch[1]:sequence[1]:call-process[1]]
                    [error message=Invalid Update Criteria specified in the request. The valid value is : Notes]"


                    Using a valid event id directly in the XML (without the Context Icon) works perfectly, nothing wrong, the adapter knows to update the Notes.


                    A workaround for now it to use Assign to define the entire XML (including Context icons) to a context and then use only this context in the module XML.


                    So, it looks like a bug where DevStudio does not format the code correctly when you use a Context as shown.


                    Maybe Development can confirm this ... who are they?



                    • 7. Re: How to use 'inputevent'?

                      OK .... we have a confirmed bug. In this case adding the context to the XML of the Annotate Event module as the screenshot shows.

                      Bug Reference: AMP-14078.


                      This may also affect other modules where you try to use a context in this manner (I haven't checked any other modules)