oid_modify_attr() issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
oid_modify_attr() issue
Again I appreciate your time and the information you kindly provide me.
Paulette
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Steve,
the oids I get them using Java, what I do first is get the Document through the "Acl.getDOMDocument(String.valueOf(docID))" using the value corresponding to the DocID of my document, then I get the first child of the book as a Node and I start to navigate though its children nodes, while I'm navigating I try to find the section elements using theoid_find_children() acl command through a call from java using the line "Acl.func(oid_find_children(), oid_dad)", from that call I'll receive in java from acl an array of OIDs related with sections, I'll navigate through those OIDs and save those OIDs in a structure I created for later use, those OIDs are the which one I'm using to change the attribute of the sections.
In order to change the attributes, I will navigate in Java through my structure and once I found the desired section I'll call a function in my ACL script since Java passing the corresponding oid I saved before, to change the "revision" attribute of the desired section inside my document.
Does it help you this information to understand better how I'm getting the oids? 🙂
Again, thank you so much!
Paulette
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Steve,
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I suspect that something is getting lost in all that back-and-forth between Java and ACL. The two systems can certainly interact with each other, but my experience is that things work more smoothly if you can keep the transfer points to a minimum. Going from Java to ACL to Java to ACL just provides more opportunities for type mismatches and other such issues that can make debugging tricky.
If you are not able to use the OIDs from your Java output on the command line, they might not be valid. You could try using something like
response(oid_valid(‘(101,1,34)’))
to verify that your OID e.g. ‘(101,1,34)’ actually exists. You could also pass it to goto_oid() to see whether the element it refers to is the one you think it should. Note that you should be passing it as a string (inside quotes) if you are copying and pasting the actual OID value.
Finally, you can check the value of $main::ERROR or $main::ERRORS after running your script to see if ACL is providing any messages about why it wasn’t able to do the oid_modify_attr() operation, for example if the OID is not valid or if the document is read-only.
--Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
to be careful about when you get your oid relative to when you act on your
oid.
On Fri, Nov 21, 2014 at 11:14 AM, Clay Helberg <->
wrote:
> Hi Paulette--
>
>
>
> I suspect that something is getting lost in all that back-and-forth
> between Java and ACL. The two systems can certainly interact with each
> other, but my experience is that things work more smoothly if you can keep
> the transfer points to a minimum. Going from Java to ACL to Java to ACL
> just provides more opportunities for type mismatches and other such issues
> that can make debugging tricky.
>
>
>
> If you are not able to use the OIDs from your Java output on the command
> line, they might not be valid. You could try using something like
>
>
>
> response(oid_valid('(101,1,34)'))
>
>
>
> to verify that your OID e.g. '(101,1,34)' actually exists. You could also
> pass it to goto_oid() to see whether the element it refers to is the one
> you think it should. Note that you should be passing it as a string (inside
> quotes) if you are copying and pasting the actual OID value.
>
>
>
> Finally, you can check the value of $main::ERROR or $main::ERRORS after
> running your script to see if ACL is providing any messages about why it
> wasn't able to do the oid_modify_attr() operation, for example if the OID
> is not valid or if the document is read-only.
>
>
>
> --Clay
>
>
>
> *From:* Paulette Zorrilla [
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Paul, Clay,
I'm making a kind of remap everytime I modify one section and I insert or remove any section inside the document, this way my tool will navigate through the document identifying the oids that change after the modification. Something that is causing me doubt is why if I try to change the attribute manually using the command line of the editor, the attribute can not be modified, I tested some other commands having the oid, for example oid_select() to test if the oid is valid and it refers to the section I want and those commands worked, I'm not sure if there's any restriction to modify attributes.
Again, thank you so much for your help.
Paulette :D.
