9 Replies Latest reply: Aug 3, 2012 11:18 AM by user9330447 RSS

    What exactly 'PAYLOAD' Means???

      What exactly 'PAYLOAD' means.??? Please help me with simple examples and in context of BPM process.
        • 1. Re: What exactly 'PAYLOAD' Means???
          Sudipto Desmukh

          If you understand ADF BC this should help -
          • 2. Re: What exactly 'PAYLOAD' Means???
            Ravi Jegga
            I hope the earlier links from Sudipto should give you an idea. In simple terms, in context to a BPEL or BPM Process, I would treat Payload as the Input data that each user/service in that Process will Work On. Means they want enter or modify that data.

            Simple Example: Vacation Request BPM Process. As an Employee, I want to go on Vacation and this has to be approved say by 4 people above me (I am the lowest last employee in the company). They can either Approve or Reject. Approve will go forward, and Reject will go in back direction.

            Me Employee -> Team Lead -> Project Manager -> Manager -> Supervisor.

            The payload is simply the data or the information that each user sees. In this case its a Vacation Request, so the data will be like
            Vacation Start Date
            Vacation End Date:
            Reason For Vacation
            Emergency Contact.

            We do need final response back from the superiors after final approval. And that can be like Approved or Rejected with Reasons.

            Since this is a process, everything is a XML. And the Payload will look like this: You will define a .XSD Schema that produces a xml like shown below.
                  <st_date></st_date> --- of type Date
                  <end_date></end_date> --- of type Date
                  <reason></reason> --- of type String
                  <contact_phone></contact_phone> --- of type number
                  <outcome></outcome> --- of type string - Approve or Reject
                  <reason></reason> --- of type string - Reason why vacation request is rejected like there is a production deployment next week etc etc.
            If you take a Ordering system, it will have lot of XSD elements like above to show product detail, line items, discounts, shipping address, credit card details etc etc.

            I hope this should give you an idea.

            Ravi Jegga
            • 3. Re: What exactly 'PAYLOAD' Means???
              Hi Ravi,

              Thank you very much for your explanation. That's is really helpful.

              But, I need some more basic clarifications.

              1) In a BPMN Process diagram. Let us consider I have some 4 activities in the process diagram. So the input and output to all these activities is XML Only or any other type also???
              2) So, payload means only the input to the activities? can we call the output of activities also as payload?? can we call input payload/output payload???
              3) Some where I read task payload and data payload. What is the difference between the two???

              Please help me with some example like you had mentioned in last reply.

              • 4. Re: What exactly 'PAYLOAD' Means???
                Ravi Jegga
                Yes. Both the Inputs and the Outputs of each Task can be treated as payload. Like VacationRequest is input Payload and RequestOtucome (Approve or Reject with reason etc) is an Ouput Payload. For a complex ordering system, you can have n number of payloads with each payload xsd having sepecific elements. We can have one big .XSD file with all the elements in different sections. Or you can have multiple small .xsd elements. You can configure all these during your process creation.

                Now coming to Task Payload and Data Payload I would give you a simple definition (from my understanding). Data Payload is literally specific to your application that is created by you like Vacation Payload, Order Entry Payload, etc. Where as Task Payload is the out of box Payload with same xml data that comes out of box and you do NOT create it. This Task Payload is again applicable for all the Tasks in your Process. Simple example of some elements are like TaskTitle, TaskNumber, TaskId, TaskStatus, Task Assignees, Task Created Date and there are lots of other SystemAttributes that you can use for Custom Views, Searches, Flex Fields etc. All these fields are common for any Process and hence they are out of box. You can refer, use and update this entire Task Payload from process or using Task Java APIs.

                Create a simple process like HelloWorld. Deploy and create and submit a Task. Go to EM Console and inspect that task payload details. See your custom data payload stuff and out of box task payload stuff also.

                Ravi Jegga
                • 5. Re: What exactly 'PAYLOAD' Means???
                  Once again Thanks Ravi for your reply. One question I forgot to mentioni n my previous message.

                  You are talking about the xsd's right. These xsd's are by default created by the BPM or do we need to create these.

                  Consider a scenario. where I created

                  1) BPM Project - contains BPM folder and SOA folder
                  2) will create a process
                  3) In this process will add a human task and followed by a service task and end event.
                  4) So when the Xsd's are created??? or the xml's?? and where that will avaialble?? as per my understanding these xsd's are called as payload??

                  As you suggested I will create a Hello wrold application also.

                  Is all the data in the BPM process is in XML form only.???
                  • 6. Re: What exactly 'PAYLOAD' Means???
                    Ravi Jegga
                    XSD Elements are created even before you start designing your process in BPM or BPEL. Remember XSD is the one that defines the data that your process is going to use. So yes, first create your XSD and copy them to your bpmProcess/xsd folder or any location. Now create a bpm process, add a User Task. In User Task, you click on Implementation, thats when you refer to this XSD. I am not giving all the intermediate details. For that you refer to some samples on net. Basically once you define XSD, you create something called Data Object by going to BPM Project Navigation Tab. For this Data Object you create something called Process Data Object. And this processDataObject is what you use when you Implement any Task in Process. NOW when you create Data Objects, you can browse and choose your existing XSD or you can create simple payload elements on the fly of standard types like string, int, date etc. If you see HelloWorld online BPM Sample, thats what they do. There is nothing wrong. Its just ones personal choice. If I know my payload, I would prefer creating XSD first and use this to create Data Objects.

                    As mentioned, there is NO need to create any Task Payload and this is done automatically for your out of box. And is shown up for each Task.

                    Yes, all the data in the process is in the form of XML only. Even though you use EJB or Java Services or DB Adapter, internally they are converted to some complex xml data structure. You can refer code in your EJB, but the output from that EJB method is mapped to some elements in XML only.

                    New to BPM: How to get the tasks in the Workspace

                    Ravi Jegga
                    • 7. Re: What exactly 'PAYLOAD' Means???
                      Oh Thats really helpful ravi.

                      One final question.

                      As I said consider a case where I have a start event, followed by human task, service task and end event.

                      here the service task takes input as some id, email address.

                      So, if i want to mention about the payloads for each of these activities (human task, service task) in some technical word document.

                      Can I mention the payload for service task directly as id, email address or do i need to specify that in xml format only???

                      I can see when i create a human task system is generating two xml file one related to payload.xml and second one is related to humantak.xsd

                      So but what will happen in case of a service task???
                      • 8. Re: What exactly 'PAYLOAD' Means???
                        Ravi Jegga
                        1. You will not have a separate payload for each element in your entire process. There may be some extra additional attributues each task may need. If possible put all of them in one single payload .xsd file itself. Then make use of specific fields for specific task.
                        Putting them in word doc will not help except for your documentation. They all should go into .xsd file under your composite/xsd folder.
                        Even if you have script task, still you need to put any fields for that in xsd or xml format only.
                        When you generate human task, means you drag and drop a human task on a process. Then double click and go to iimplementation and click on + icon to add a new task and thats where you give you payload.

                        One friendly suggestion is, too much of theory will be confusing specially for soa/bpm applications. I would recommend with this understanding you have start practical like with Hello world or or simple examples from online. That way, we can understand both theory and see how this is actually implemented. I do not want to confuse you with more theory. So start with actual sample and if you have any quesions then we can take from there.

                        The sample will give pretty much all the details. I do not have any right right now. But google around you should find some.

                        Ravi Jegga
                        • 9. Re: What exactly 'PAYLOAD' Means???
                          Hi Ravi,

                          Thank you very much for your suggestions and help. YOur explanation with examples are really very useful for a beginner.

                          COuld you please look into this issue also.

                          Sending an Email using Notification Task


                          Edited by: user9330447 on Aug 3, 2012 9:18 AM