mrmathison's Profile
Agile Talent
270
Points

Questions
28

Answers
41

  • Arif, Please ignore my last message.  I needed to comment the ai_item line of code.  It worked!  Wow, that is great.
    Thanks,
    Mark

    • 3634 views
    • 10 answers
    • 0 votes
  • I commented that line, but got a new fail message this time.  The Handler name is:  Update_Part_LSR_MRR_from_ECO    and the error I got is this:
    com.agile.agileDSL.ScriptObj.AgileDSLException: No such property: m_session for class: Update_Part_LSR_MRR_from_ECO

    Thanks,
    Mark

    • 3634 views
    • 10 answers
    • 0 votes
  • Update.. this is the first time we have used Events.  I needed to add a privilege to the Administrator so I could ‘Enable Trigger Events’.  Then I tried another test.  This time I see a message in the Event Handler Monitor.  It still failed.  Any idea what this message means?   No signature of method: com.agile.api.pc.change.RowAI.next() is applicable for argument types: () values: {}

    • 3634 views
    • 10 answers
    • 0 votes
  • Thanks Arif.  I edited your script slightly, but something is not working.  First I created the Event Handler, which includes the script code.  Then I created the Event, which is for ‘Change Status for Workflow’, for a specific workflow, and when the status changes to ‘Released’.  Then I created the Event Subscriber which links the Handler to the Event.  I then did a test, edited those values in the ECO Affected Items, released the ECO, but the item Page Two values did not get updated.  Not sure what is missing.  Those event things all say enabled.  And by the way, where do messages go from the script ‘obj.logMonitor()’ ?   Below is my version of Arif’s script.   Thanks, Mark

    //———–
    import com.agile.agileDSL.ScriptObj.IBaseScriptObj
    import com.agile.agileDSL.ScriptObj.AgileDSLException;
    import com.agile.api.*;
    import java.util.*;
    import com.agile.px.IEventInfo;
    import com.agile.px.EventConstants;
    import com.agile.px.IWFChangeStatusEventInfo;

    void invokeScript(IBaseScriptObj obj) {
      IAgileSession session = obj.getAgileSDKSession();
      IEventInfo req = obj.getPXEventInfo();
      IWFChangeStatusEventInfo e = null;

      try {
        if (req instanceof IWFChangeStatusEventInfo) {
          eventInfo = (IWFChangeStatusEventInfo)req;
        }
        String message = “Update: Nothing to process”;
        obj.logMonitor(“Now looking at Affected Items LSR and MRR”);

        if (eventInfo!=null) {
          IDataObject dataObject = eventInfo.getDataObject();
          IAgileClass relObjectClass = dataObject.getAgileClass();
          if (!relObjectClass.isSubclassOf(ChangeConstants.CLASS_CHANGE_ORDERS_CLASS)){
     //throw new AgileDSLException(“The PX is only applicable for Change Order”);
            obj.logMonitor(“The PX is only applicable for Change Order”);
          }
     // Iterate through Affected Items table
          ITable ai = dataObject.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);
          Iterator it = ai.iterator();
          IRow row = null;
          while(it.hasNext()) {

            row = (IRow)it.next();
            ai_item = (IItem)row.next();

            String item_number = (String) row.getValue(ChangeConstants.ATT_AFFECTED_ITEMS_ITEM_NUMBER);
            obj.logMonitor(“Item number: ” + item_number);

    //You can get desired change attribute value here or the base-ID

    // —– LSR —–
    // Affected Item TEXT12 contains the LSR (Lowest Ship Rev)
    // —————
            String m_value_LSR = (String) row.getValue(ChangeConstants.ATT_AFFECTED_ITEMS_TEXT12);
            obj.logMonitor(“Affected Item LSR: ” + m_value_LSR);

    // —– MRR —–
    // Affected Item TEXT14 contains the MRR (Min Repair Rev)
    // —————

            String m_value_MRR = (String) row.getValue(ChangeConstants.ATT_AFFECTED_ITEMS_TEXT14);
            obj.logMonitor(“Affected Item MRR: ” + m_value_MRR);

    // —– Now let’s update the item —–
            IItem m_item = (IItem) m_session.getObject(ItemConstants.CLASS_ITEM_BASE_CLASS, item_number);

    // Page Two of the Item will hold the LSR (Lowest Ship Rev) in TEXT16
            m_item.setValue(ATT_PAGE_TWO_TEXT16, m_value_LSR);

    // Page Two of the Item will hold the MRR (Min Repair Rev) in TEXT20
            m_item.setValue(ATT_PAGE_TWO_TEXT20, m_value_MRR);
          }
          obj.logMonitor(“Succesfully updated the values”);
        }
      }
      catch (Exception ex) {
        ex.printStackTrace();
        obj.logMonitor(“Update was not successful”);
        throw new AgileDSLException(ex);
      }
    }

    • 3634 views
    • 10 answers
    • 0 votes
  • An Oracle consultant told me the CHANGE table may have been used for that flag for older versions of ChangeCAST.  He told me to look at the TRANSFERFLAG table instead. 
    Yes, that is the table I should be looking at.   The field in the table is TRANSFER_FLAG.   In ChangeCAST I set the flag to No, and this was what I saw in the table:

    SELECT TRANSFER_FLAG FROM TRANSFERFLAG WHERE CHANGE_NUMBER = ‘BCO-0034’
    Output
    10000000000000000000000000000000

    Then I went back into ChangeCAST and set the flag to Yes. I ran the query again and it shows this:

    Output
    11000000000000000000000000000000

    In the future, I can update that field with the 1100… value to set them to Yes.

    • 1860 views
    • 5 answers
    • 0 votes
    • 1731 views
    • 4 answers
    • 0 votes
  • Thanks Florina.  Is the CHANGE table you mention on the Agile server, in the AGILE schema?

    In the CHANGE table from Agile, I see 5 distinct TRANSFERRED values.  Here they are with counts:

    SELECT count(*) from CHANGE where TRANSFERRED IS NULL    —  count = 102,796
    SELECT count(*) from CHANGE where TRANSFERRED = ‘1’        —   count = 37
    SELECT count(*) from CHANGE where TRANSFERRED = ‘1 100000000000000000000000000000’    —  count = 5
    SELECT count(*) from CHANGE where TRANSFERRED = ‘10000000000000000000000000000000’   —  count = 3,263
    SELECT count(*) from CHANGE where TRANSFERRED = ‘10100000000000000000000000000000’   —  count = 501

    I tried using the ‘Set Transfer Flag’ from the ChangeCAST GUI.  The CHANGE.TRANSFERRED value was null, then I changed it to Yes from the GUI and it was still null.  Is there another CHANGE table local to ChangeCAST?

    • 1860 views
    • 5 answers
    • 0 votes
  • Thank you Danny.  What you wrote should be in the Oracle manual.

    • 2106 views
    • 3 answers
    • 0 votes
  • I opened a service request with Oracle Support and this is their reply:

    This is not the correct URL users should be using for whatever reason/issue to access Agile PLM, as per the application code:
    https://agileplm.<your-domain.com>/Agile/default/login-cms.jsp
    Users should always be using this URL anytime, resolving any issues if any in case:
    https://agileplm.<your-domain.com>/Agile/PLMServlet

    We also turned off a caching setting on our A10 network appliance which seemed to help.  Traffic flows through this secure A10 device then to the Agile server.
    Mark

    This answer accepted by mrmathison. on April 18, 2024 Earned 15 points.

    • 10801 views
    • 3 answers
    • 0 votes
  • Agile Talent Asked on January 15, 2016 in Agile PLM (v9).

    Thanks, I also found this on the Oracle Support site, Document 568607.1

    How to Convert a Database User to an LDAP User? (Doc ID 568607.1) 

    APPLIES TO:
    Oracle Agile PLM Framework – Version 9.2.1.0 and later
    Information in this document applies to any platform.

    GOAL
    How to convert a database user to an LDAP user?
    Users already exist prior implementing LDAP, now want to covert these users from using Agile Database authentication to LDAP authentication.

    SOLUTION

    IMPORTANT:
    This solution requires a database edit.
    Before any modification, please make sure you have a backup copy of production database.
    Check with DBA or call Agile Support if any questions and concerns.

    *** To convert ALL database users to LDAP users:

    1. Go to AgileAgileDomainbin

    2. Open a command window and run below command which will clear all agile users auth_src, guid values:
    migrateUsersToDB -R

    3. Run below command:
    migrateUsersToDB

    4. Restart Agile service.

    *** To convert specific users from database authentication to LDAP authentication:

    1. Connect to agile database in sqlplus

    2. Find the current authentication values for this user

    SELECT AUTH_SRC, GUID FROM AGILEUSER WHERE LOGINID='<User’s loginID>’;

    If user is database authenticated, AGILEUSER.AUTH_SRC will have value “AGILE_DB”.
    If user is LDAP authenticated, AGILEUSER.AUTH_SRC will have value value like LDAP_<ldap name configured in Java Client>

    3. Update this user

    UPDATE AGILEUSER SET AUTH_SRC=NULL WHERE LOGINID='<User’s loginID>’;
    UPDATE AGILEUSER SET GUID=NULL WHERE LOGINID='<User’s loginID>’;
    COMMIT;

    4. Update the LDAP time stamp in Agile

    UPDATE PROPERTYTABLE SET VALUE=’1970-01-01 00:00:00′ WHERE PROPERTYID=479 AND PARENTID=5004;
    COMMIT;

    5. Restart Agile service

    6. Run refreshing users from LDAP.

    Note: User attribute information controlled by LDAP will be updated with the information configured in LDAP
    Note: There is no Agile API to update GUID and AUTH_SRC as these are internal only attributes. These changes must be done using sql.

     

    • 4620 views
    • 3 answers
    • 0 votes