4 Replies Latest reply on Oct 6, 2012 5:40 AM by 876162

    Activity Attribute (which reference item type attributes)

      Hi Friends
      I have been studying about Oracle Workflow for quite a time.I have gone through oracle developer and admin guide on workflow as well
      But there is one question I am unable to solve

      My Question is :
      Why we need to have activity attributes( which reference item type attributes )in case of function activity and notification activity ,when we can directly use value from item type attributes e.g having order_number (activity attribute) which references order_number (item type attribute).whts the need of this?

      Some Understading from my side:
      I understand the logic of having activity attributes in case of message attributes : that's because , these activity attributes get used in message subject , body
      and there is need of activity attributes (which reference item type attribute at run time ) e.g we might have to print order number in subject of mail.

      -In case of function activity , I understand that we need activity attribute which have constant value , so that we can distinguish between various uses of single activity one of example of such kind can be logging progress of workflow.

      - But what is the point of having an activity attribute ( which reference item type attribute)
      e.g I have seen order_number as an activity attribute which reference order number (item type attribute) and in the plsql procedure that is called we use
      wf_engine.getactivityattrnumber to get value of order_number activity attribute ,
      but whats the need of this when we can get value from order number (item type attribute) by using wf_engine.getitemattrnumber??

      Thanks in advance :)
        • 1. Re: Activity Attribute (which reference item type attributes)
          Saroja Kandepuneni-Oracle
          The item attributes are like global variables they can be referred in all the activities. where as the activity attributes can be used only within the activity.

          say for example you have a message activity having the activity attribute 'order_number'.
          In the message body if you want to include the value of 'order_number' you can only refer to message attributes, but not item attributes.
          The value for activity attribute 'order_number' can be as some constant value or it can refer to a item attribute if you want to set the value at run time.
          At runtime you can set values for item attributes only but not for activity attributes, that is the reason we usually create activity attributes that refer to item attributes.

          I hope it clears your doubt.
          1 person found this helpful
          • 2. Re: Activity Attribute (which reference item type attributes)
            Thanks for your reply
            Actually I understand that logic of having activity attributes in case of messages , as you mentioned order number in this case.Because if we need to refer a particular value in message body , then we need it as activity attribute.That is fine.
            Actually I am trying to know, whats the need of activity attributes in case of functions and notifications.

            • 3. Re: Activity Attribute (which reference item type attributes)
              Alejandro Sosa-Oracle

              In the case of functions the logic is the same as explained by Saroja. The PLSQL program associated to the function only makes use of the activity attributes, not the item attributes. Take for instance the standard function Execute Concurrent Program (EXECUTECONCPROG). See that it has the parameters pertinent to submit a program via concurrent managers: application short name, program short name, arguments, and so forth. When the associated plsql program is called (which by the way follows the same standard PLSQL structure of itemtype in varchar2, itemkey in varchar2, actid in number,
              funcmode in varchar2, resultout in out nocopy varchar2) it uses all the ACTIVITY's attributes to get what it needs to finally call the FND routines to submit a program, it does not have to cherry pick them.

              It would not be possible to scan all the item attributes to tell which ones need to be used for this particular function because attributes at item type level can be used by other processes, activities, messages, etc.


              1 person found this helpful
              • 4. Re: Activity Attribute (which reference item type attributes)
                Thanks for your reply
                I understood your point .But basically you have taken a standard activity which calls a standard activity
                As far as I understand, activity attributes for standard activity have predefined meaning and they are used in that particular way only
                and hence the plsql program that is called uses they ACTIVITY attributes e.g If I may take an example of
                Wait for Flow Activity which uses standard procedure WF_STANDARD.WAITFORFLOW and has predefined ACTIVITY attributes Continuation Flow and Continuation Activity attributes .So till here I am fine that for standard activities , attributes are standardd and they are used accordingly.

                But I want to know in case user defined activities (read functions and notification),which make call to user defined plsql program ,what is point of having ACTIVITY attributes which refer to ITEM TYPE ATTRIBUTES

                Because as per definition of ITEM TYPE ATTRIBUTE
                An item type attribute is a property associated with a given item type.It acts as a global variable that can be referenced or updated by any activity within a process.

                I hope I m not sounding confused

                Thanks :)