Matt Paulhus's Profile
Agile Angel
1051
Points

Questions
25

Answers
144

  • Agile Angel Asked on July 26, 2018 in Other APIs.

    Thanks for your help, Swagoto,
    The input stream is precisely the end goal of my original question – thanks for reading my mind! 
    It didn’t work for me though – if it does for anyone else, that’s great.  Looks like within Agile API I can make it work off of an InputStream is = ((IAttachmentFile)row).getFile() per the Agile API user guide.  I have both ‘C:AgileFiles’ (test server) and ‘D:AgileFiles’ as my base_storage directory so when I tried InputStream  is = new FileInputStream(new File(“C:/Agile/Files/000/770/474/agile77047443.pdf”)); I received the java.io.FileNotFoundException “C:AgileFiles?0’4agile77047443 (The system cannot find the file specified)”.

    • 2314 views
    • 8 answers
    • 0 votes
  • Agile Angel Asked on July 26, 2018 in Other APIs.

    Hi Swagoto,

    I might be missing some small detail but I can’t seem to figure it out.  I’ve tried many combinations but keep getting a Tomcat “The requested resource XXXX is not available” error. 

    Is this anywhere close to how we should get a file directly (to give out a more concrete example)?  
    http://[agile]:[port]/Filemgr/AttachmentServlet/000/770/474/agile77047111.pdf

    • 2314 views
    • 8 answers
    • 0 votes
  • Agile Angel Asked on July 24, 2018 in Other APIs.

    I’ve been able to get the file off of the CONTENT_URL using BufferedOutputStream from a URL.openStream() via Java, though the CONTENT_URL field only lasts a little bit before it’s nullified.  I’m looking to see if I can run that same method using the IFS_FILEPATH instead.  I tried appending the FileManger URL +’C:AgileFiles’ (base_storaged_dir) + IFS_FILEPATH to see if I can use a direct URL to a file but it hasn’t succeeded.  Any ideas there?

    • 2314 views
    • 8 answers
    • 0 votes
  • I thought it should be as easy as using ICell.  Try: 

    IItem item = eventInfo.getDataObject();
    String old_page_three_value = (String) item.getCell(CommonConstants.ATT_PAGE_THREE_LIST19).toString();  //I’ve had issues with the .getValue() method in Java versus doing the same thing in Groovy

    • 1257 views
    • 1 answers
    • 0 votes
  • Agile Angel Asked on July 20, 2018 in Other APIs.

    Thanks Kevin, I think you might be on to something there.  Looks like only doc, pdf, txt, xls, and xml files are being indexed in our system as those are some of the file types supported under Full Text Search.  Docx is not supported so its content_url field remains null.  

    Looks like we can use content_url as a sort of ‘back door’ to get files.  Is there a way to use the ifs_filepath column in SDK to get and read files?

    • 2314 views
    • 8 answers
    • 0 votes
  • Agile Angel Asked on July 17, 2018 in Agile PLM (v9).

    Easy – just throw a regular exception.  This is kind of what I use.  Let me know if it doesn’t work for you.

    try {
    //condition 1
    //must use -Pre, Synchronous, and Stop event subscriber settings and an equivalent catch block

    Boolean valid = false
    if (!valid) {   
       throw new Exception (“Hi, your ECO failed validation checks because of some reason. Please fix.”)
    }

    } catch (Exception ex) {
    obj.logMonitor(ex.getMessage().toString());
    throw new AgileDSLException(ex);
    }

    • 1327 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on July 16, 2018 in Other APIs.

    Thanks Swagoto – that’s usual but not exactly for my purposes.

    I was wondering if  there’s a way to actually copy the file into a database table cell (blob or text type, specifically).  What you gave me helps me get a link like C:AgileFiles00?0%9agile77041234.pdf but that’s not the same has having an external (internal to firewall but external to Agile) database actually have a copy of the file.  Is there a way to push the byte data of a file into a database cell?

    • 1878 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on July 13, 2018 in Agile PLM (v9).

    True – I haven’t dealt with IPrograms but ITransfer Order Where Sent table and a Part’s Manufacturers table requires the same thing – you need two or more different fields added to a Map object in order to create the row.

    • 1299 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on July 13, 2018 in Agile PLM (v9).

    You received a null pointer exception which does indicate that Agile tried to get an object but that object was null.  It’s like adding an item number to the affected items tab versus IItem.  Looks like you figured it out.  In my earlier answer, if you didn’t have enough required fields to create the row, I think the normal error message you would have received there should have been an “Invalid Parameter”.

    • 1299 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on July 12, 2018 in Other APIs.

    I guess if I need to re-frame my question:  is there a way for a connection to pull a file from Agile or get a file via database query (not the meta data, but rather the hard data or blob/clob data).

    • 1878 views
    • 3 answers
    • 0 votes