This discussion is archived
12 Replies Latest reply: Apr 18, 2012 10:18 PM by 909341 RSS

Update/Insert child entity record in siebel when a session is saved in WD

909341 Newbie
Currently Being Moderated
Hi,

We have a requirement where we need to create/update a child entity's record in siebel when user clicks on save session link in WD window after the rule execution. We are using IO mapping. Account is the parent entity and let's say B is the child entity.We are storing row_id of the new created B record in a field of Account BC(before the WD call we are creating a new B record).

So, in the rule we need to update one field of B entity such that we can update the new created B record using EAI Siebel Adapter BS in the Policy Automation Save Session IO Post WF. We wrote like below.

reason(B's field) = RejectionReason (Account's attribute) if
ButtonOption = "Reject"
and
B's id = Account's field where B's row_id is stored for the new record

but we found that we had to use rule table for this.
We used the rule table like below(could not paste the table):

rule_loop

Reason

RejectionReason     ButtonOption = “Reject”
And
B’s row_id = B’s row_id in Account

Reason     otherwise

It is setting B's Reason field for the particular record of B, but for rest of the B's records it is setting Reason to null although we do not want to change the Reason for rest of the B records.

Could you please help us on this? Also how to navigate to the question screen directly if any attribute value is null? We added the screen flow but now it is directly showing the summary screen even if the attribute value is null.

Thanks in advance!

Regards,
Subhradeep
  • 1. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi,

    Tried with Shortcut Rule but it is not even setting the Reason for any of the B records. A quick responce will be a great help!

    Thanks & Regards,
    Subhradeep
  • 2. Re: Update/Insert child entity record in siebel when a session is saved in WD
    frank.hampshire Expert
    Currently Being Moderated
    Subhradeep,

    I am trying to understand what you are trying to and Im not really clear. Perhaps if you could explain the rule you are trying to write without talking about siebel.

    What I have so far.

    Rulebase has an "Account" entity
    Account entity has a child entity "B"

    You are trying to update an attribute Reason in "B"

    ... and that's all I have for the moment.

    Cheers
    Frank
  • 3. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi Frank,

    Yes, the parent entity is "Account" and the child entity is a new entity(B).One Account can have multiple B records(1:M relationship).Before calling WD one B record is created for the Account and we are storing the row id of that record in Account BC.

    In WD screen we have dropdown where user can select "Reject" option for the product offered to him.

    user selects "Reject": in the next screen he will select the Rejection Reason and when he saves the session the Reason field of the new B record will be updated.

    We have created an IO to send data to OPA where Account is the primary BC.So if we can update the Reason of B in the rule(for the new B record) then we can directly use the IntegrationObject returned from OPA and use EAI Siebel Adapter BS to update that B record in Policy Automation Save Session IO Post WF.

    So we need:
    Update Reason for the new B record, do not update the Reason for rest of the B records.We had written in a rule table like below:

    rule_loop
    ---------------------------------------------------------------------------
    Reason
    ---------------------------------------------------------------------------
    RejectionReason     ButtonOption = “Reject” and B’s row_id = B’s row_id in Account
    --------------------------------------------------------------------------
    Reason     otherwise
    ---------------------------------------------------------------------------
    (B’s row_id in Account, RejectionReason are global attributes for Account, Reason is the B's attribute)
    when we used the IntegrationObject in Siebel(after the save session) it is updating Reason of the correct B record(new one)...but for rest of the B records Reason becomes null(the otherwise condition). We do not need to update the Reason for the remaining B records.

    Please could you suggest us how to stop updating the Reason of the remaing B records in the rule itself?

    Thanks & Regards,
    Subhradeep
  • 4. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi,

    This issue is stopping us from progressing further. A quick responce will be a great help.

    Thanks in advance!

    Regards,
    Subhradeep
  • 5. Re: Update/Insert child entity record in siebel when a session is saved in WD
    frank.hampshire Expert
    Currently Being Moderated
    There is no concept of "updating" an attribute in OPA.

    Values for an entity can be either inferred (reasoned by OPA) or base level (the value is provided). This means that if you write a rule to infer "Reason" for an entity, then that attribute is inferred for all entity instances.

    However, you may be able to do the following:

    In Siebel tools, edit the Integration Object

    1. Create an Field on the "B" integration component called "Updated Reason".
    2. Set its type to "Custom" - a custom field does not link back to a BC component
    3. If you need to make sure to add the OPAAttribute custom property to map the new field to an OPA Attribute

    In Policy Modeling, edit the rulebase

    4. Create a new attribute on the B entity called New Update Reason
    5. Write a rule that does the following.
    ----------------------------------------------------------------------------------
    | Updated Reason                                                                 |
    ----------------------------------------------------------------------------------
    | RejectReason | ButtonOption = “Reject” and B’s row_id = B’s row_id in Account  |
    ----------------------------------------------------------------------------------
    | Reason       | otherwise                                                       |
    ----------------------------------------------------------------------------------
    Using this approach the inferred attribute "Updated Reason" will either contain the RejectReason or the Reason (the existing value).

    When the IO is saved back to Siebel the Integration Components "B" will have the new "Updated Reason" field with the inferred value. From there, its a fairly simple piece of escript to replace the Components "Reason" field with the "Updated Reason" value.
  • 6. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi Frank,

    Thanks it worked, instead of scripting we used the data map to change the value. One more thing. In the rule table how can I check multiple logical condition(AND /OR), by writing the following it gave me conjunction error.

    Updated Reason |
    ----------------------------------------------------------------------------------
    | RejectReason | ButtonOption = “Reject” or ButtonOption = "Accept" and B’s row_id = B’s row_id in Account |
    ----------------------------------------------------------------------------------
    | Reason | otherwise |
    ----------------------------------------------------------------------------------

    Thanks & Regards,
    Subhradeep
  • 7. Re: Update/Insert child entity record in siebel when a session is saved in WD
    Jasmine Lee Expert
    Currently Being Moderated
    Each condition needs to be on a new line. Try something like this in the table cell:

    ButtonOption = “Reject” and
    B’s row_id = B’s row_id in Account

    If you have a mixture of AND and OR, then you need to structure the premises (in terms of Level 1, Level 2, etc.) in the same way you would if using a regular non-table Word rule.
  • 8. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi All,

    We are sending the data from Siebel to OPA as IO hierarchy, now if an entity is not there(like no Opportunity record is there for an account), can we write the rule in a way such that the Opportunity xml portion will be created when the session is saved and we can use the IntegrationObject in "Policy Automation Save Session IO Post" WF to create an opportunity for that account?

    We tried this with data map, but the opportunity portion remains blank in the return xml from OPA to Siebel (as no record was there while sending data to OPA).

    Thanks & Regards,
    Subhradeep
  • 9. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    When a record is already there, a new record is being created, but it is not working when there is no record sent for the parent entity.

    Thanks & Regards,
    Subhradeep

    Edited by: SG on Apr 14, 2012 8:47 PM
  • 10. Re: Update/Insert child entity record in siebel when a session is saved in WD
    frank.hampshire Expert
    Currently Being Moderated
    SG wrote:
    Hi All,

    We are sending the data from Siebel to OPA as IO hierarchy, now if an entity is not there(like no Opportunity record is there for an account), can we write the rule in a way such that the Opportunity xml portion will be created when the session is saved and we can use the IntegrationObject in "Policy Automation Save Session IO Post" WF to create an opportunity for that account?

    We tried this with data map, but the opportunity portion remains blank in the return xml from OPA to Siebel (as no record was there while sending data to OPA).

    Thanks & Regards,
    Subhradeep
    Unfortuntately, you wont be able to do this with Siebel Connector/ OPA 10.3 (in OPA). However, this will be supported in OPA 10.4 (when Siebel Connector 10.4 is released).
  • 11. Re: Update/Insert child entity record in siebel when a session is saved in WD
    909341 Newbie
    Currently Being Moderated
    Hi Frank,

    Thanks for the information. I tried to download OPA 10.4 but I found that OPM 10.4 and OPA runtime component 10.4 are available. I could not find OPA connector for Siebel 10.4, is it not released yet? or OPM 10.4 and OPA runtime component 10.4 will work with OPA connector for Siebel 10.3 itself?

    Thanks & Regards,
    Subhradeep
  • 12. Re: Update/Insert child entity record in siebel when a session is saved in WD
    frank.hampshire Expert
    Currently Being Moderated
    The connector for Siebel for an OPA version (like 10.4) is usually released a few months after the OPA release. There will be ab announcement on the forums when it is released. You will need the Siebel Connector 10.4 to work with OPA 10.4.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points