13 Replies Latest reply on Jan 17, 2014 9:30 AM by Tim Webb

    Enterprise PDM XML. Only one variable get updated each time

    Won Lek Chua

      I am looking to import variable and variable value from XML file into EPDM.

      I am following procedures provided by Solidworks as attached here.

       

      My problem is only one variable value get updated when I change the document state to trigger the action.

      Is there anyone got this problem before?

       

      I believe I have written correct xml file, and at the moment we are trying to update one file with two variables only.

      Poll frequency set at 3 minutes.

      The xml file saved in a folder in our server successfully disappear (which means EPDM can recognize and successfully poll the file).

      Then, I check in SQL server, ImportDocumentVariables, two variables are successfully appear in the temporary table as shown below

       

      1.png

       

      Then, we set the transition in workflow, as shown below

      2.png

       

      3.png

       

      4.png

       

      And the final step, I tried to change state to trigger this transition.

      This is where the problem happened.

       

      Only 1 variable get updated as shown here. Leaving another one still in the temporary database.

      5.png

      And then I change state again, to go through the loop of workflow again to trigger the action again, now only the second variable get updated.

       

      6.png

       

      I have tried 5 variables. If I want all 5 variables get updated, I need to go through the loop of workflow to trigger 5 times, each times only one variable get updated. I can’t figure out the reason.

       

      Please advise if you have any suggestions?

       

      Thanks a lot.


        • Re: Enterprise PDM XML. Only one variable get updated each time
          Won Lek Chua

          Is there anybody got any comment on this?

           

          Thanks.

            • Re: Enterprise PDM XML. Only one variable get updated each time
              Jeff Sweeney

              Not sure what to say. I've updated entire data cards in this manner.

                • Re: Enterprise PDM XML. Only one variable get updated each time
                  Tim Webb

                  Jeff, I am running into the same issue today using 2013 SP4.

                   

                  No joy and mine is doing the same thing as Won.

                   

                  Can you post a sample xml file you use? I used the one in the administration guide and adjusted the variable names accordingly.

                  • Re: Enterprise PDM XML. Only one variable get updated each time
                    Tim Webb

                    Jeff

                     

                    Below is my xml. The import operation works, the temp tables have all the correct values, and the xml file disappears. The workflow transition for the import action is what causes the headache.

                     

                    If I use the xml file below, I get the error "Could not perform transition on file..." error using the configuration shown in the help file. If I update only one variable in the configuration element, it works!!! Arghhhh! It is probably something silly.

                     

                    See if this looks right to you. Taken from the help file and modified for my variables.

                     

                    <?xml version="1.0"?>

                    <xml>

                      <transactions>

                        <transaction

                          date="1196854268"

                          type="wf_import_document_attributes"

                          vaultname="_epdmTestbed">

                          <document

                            aliasset=""

                            pdmweid="0"

                            idattribute="Number"

                            id="24225-700"

                            idcfgname="">

                            <configuration name="">

                              <attribute name="Cost" value="4.27"/>

                              <attribute name="Supplier" value="ABC Connectors, Inc."/>

                              <attribute name="MaterialLine1" value="304 SS"/>

                              <attribute name="SAPNumber" value="T4537-Q11258"/>

                            </configuration>

                          </document>

                        </transaction>

                      </transactions>

                    </xml>

                     

                    These variables do exist, editable by the admin, are not version free, and the admin has the necessary permissions.

                     

                    Do I need one configuration element for each variable? If so, why does the help use 2?

                     

                    Thanks.

                    Tim CEPA

                    http://www.equivaq.com

                    • Re: Enterprise PDM XML. Only one variable get updated each time
                      Tim Webb

                      Can you post a sample xml file you have successfully used before Jeff?

                        • Re: Enterprise PDM XML. Only one variable get updated each time
                          Jeff Sweeney

                          I just tested again with EPDM 2014 SP0. The XML code below updated both variables in my file to their totally awesome values. It created to records in the database looking just like what Won Lek Chua found. Neither variable is versionless.

                           

                          You examples all look good to me.

                           

                          Go to the event viewer, Windows Logs, Application. This is where the database service puts messages, maybe something is in there. (Though I am doubtful, it appears the information is going into the database properly.)


                           

                          <?xml version="1.0"?>

                          <xml>

                          <transactions>

                                    <transaction

                          date="1196854268"

                          type="wf_import_document_attributes"

                          vaultname="Production">

                                              <document

                          aliasset=""

                          pdmweid="0"

                          idattribute="Drawing No."

                          id="8363654"

                          idcfgname="">

                                                        <configuration name="">

                                                                  <attribute name="Description" value="Jeff is cool"/>

                                                                  <attribute name="Project" value="Jeff rocks"/>

                                                        </configuration>

                                              </document>

                                    </transaction>

                          </transactions>

                          </xml>

                            • Re: Enterprise PDM XML. Only one variable get updated each time
                              Tim Webb

                              Jeff, those are absolutely the most awesome XML values I've ever seen!!!!

                               

                              Yes, updating one (1) SW part with these configs:

                              1. @
                              2. 0 - Default
                              3. 1 - HEADER - JST, 2 POSN PIN

                               

                              This is the process I follow while testing. My aim is to get this working on a basic level then try it with the ERP system.

                               

                              Log in as Admin, try each of the 3 configuration names shown above using the "xml import" transition with automatic return using the setup below.

                              workflow transition.png

                              This is the transition action

                              import data transition.png

                              Then copy the xml from the top level folder into the xml-import folder and it disappears.

                              xml copy operation.png

                              Here are the ImportBatches and ImportDocumentVariables tables immediately following the import. The information is going into the DB properly.

                              importbatches.png

                              importdocumentvariables.png

                              Then activate the transition on the file specified.

                              transition error.png

                              Nothing in the "Windows Logs" > "Application" log as expected.

                              windows logs applications.png

                              The 2 errors shown below are what is captured in the server error log in the EPDM admin tool.

                              conisio error log event.png

                               

                              conisio error log event2.png

                              I think that's it.

                               

                              Thanks for taking the time to look at this Jeff.

                               

                              Let me know if you see if anything in my process that is not correct.

                               

                              Thanks

                      • Re: Enterprise PDM XML. Only one variable get updated each time
                        Tim Webb

                        Our issue resolved.

                         

                        SolidWorks reviewed our database and discovered the problem was I needed to map the variables that were going to be updated with the XML import, to SolidWorks custom properties.

                         

                        Reference

                        SPR 750359 'Could not perform transition on file' error using transition with 'import XML' action when multiple non-mapped variables are updated

                         

                        Hope this helps.

                        Tim CEPA