Brian - Wednesday, April 15, 2009 7:49 PM:
Hi All,
In am working in Innovator 9.02 trying to make a simple change to a Document.
The document is in Draft state. We have the Document Change workflow installed and so have the modified Document Lifecycle.
When I go to save the Document after making any change at all I get the following error:
SamsAn - Thursday, April 16, 2009 8:57 AM:
Hi.
Document ItemType is versionable in standard solutions. So, if you lock and save Document instance then it is versioned. Thus onAfterVersion server-side event is executed (note: Document ItemType does not have any onAfterVersion event in 9.02, it seems you have a custom event). Based on the error message I conclude you have a custom onAfterVersion server event on Document ItemType. The event method tries to promote the instance from Draft to Draft (frozen) state. But no transitions found as reported. So, you should correct the method logic to have no contradictions.
Brian - Thursday, April 16, 2009 9:10 PM:
Hi SamsAn,
Turns out I am using 9.01 not 9.02. Not that I think that makes much difference.
I have looked at the onAfterVersion server event (yes there is one) and have to assume that it has been installed as part of the Document Change Solution.
The Document Lifecycle has been modifed by the Document Change Solution and does include a Draft (frozen) state.
The method code is fairly straight forward and doesn't seem to offer any contradictions.
Relevant code is
What really has me confused is that I have another test environment with the same server side method which works just fine. I even have another document in draft in the system that is throwing up the errors that works just fine but if I create any new documents they fail with this error!!
Any other suggestions?
Thanks,
Brian.
RobMcAveney - Thursday, April 16, 2009 10:35 PM:
Hi Brian -
I'm not familiar with the Document Change community solution, but I can tell you what the error message means. The method is trying to promote the Document from "Draft" state to "Draft (frozen)" state, but can't find a transition between those states. I would start by going to Views->LifeCycle on the Document form to make sure that the Document is in the LifeCycle you expect and that there's an arrow from "Draft" to "Draft (frozen)". If that looks okay, then go to the Life Cycle Map and make sure that transition is assigned to the Aras PLM identity.
Rob
SamsAn - Monday, April 20, 2009 11:09 AM:
Hi.
First, please ensure your Life Cycle Map has transitions from Draft and Preliminary state to Draft (frozen) state AND the transitions Role is Aras PLM Identity OR your user belongs to the identity assigned in Role.
Brian - Thursday, April 16, 2009 10:57 PM:
Hi Rob,
Thanks for the reply.
This is the DocumentItem.
This is the Document Lifecycle
This is the Document Instance I am trying to edit.
It all looks like it should be OK, and it is in the other instance of the database.
Thanks,
Brian.
Brian - Monday, April 20, 2009 7:39 PM:
Hi SamsAn,
As you can see from the earlier post with the images, the life cycle and transitions are as you describe.
What really surpises me is that creating the Document from a Part results in different behaviour than creating the Document directly from the TOC. Surely once the create document method is employed and the Document form is opened the internal behaviour should be the same regardless of where the Form was called from?
Brian.
RobMcAveney - Thursday, April 16, 2009 11:24 PM:
Brian -
Hmmmmm... everything you sent looks fine to me. My next step would be to try debugging the method to see if any of the values looked odd. Do you have Visual Studio or the CLR Debugger installed? If so, you can set a breakpoint (System.Diagnostics.Debugger.Break()) at the beginning of the method and step through it. If not, we'll have to get in touch with the author of the solution and see if he's ever seen this before.
Rob
Brian - Friday, April 17, 2009 1:24 AM:
Rob,
Just tried to debug using Visual Studio on a colleagues machine but it just hung. I guess I don't know how to connect the debugger up properly at this stage. Is there some trick to it or should I just be able to set a break point and it will fire up the debugger on its own?
Brian.
Brian - Sunday, April 19, 2009 11:44 PM:
Looking into this some more I have found that it is possible to create a document and edit it without getting the error if the document is created directly from the TOC and not from a Part. Also if, when the document is created from the Part AND the "Designated User" is filled in then I do not get the error.
Still a bit strange as I don't get this same behaviour from both of the database instances that I am testing with.
Since I have a viable work around now I will let this one drop.
Thanks for the pointers.
Brian.


