Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs

Trouble setting the init form variable...

Avatar

Not applicable
Hello,<br /><br />I am having trouble identifying an init form. When I click the '+' icon in the Init-Form WorkFlow designer, I give the form a name ("AbsenceFrom"), specify the path ("<path>/<fromname>.xdp"), give a choice list ("Submit,Cancel"), choose the 'data type out' ("From") and select OK.<br /><br />The system shows me a notification that says "Attempting to load Schema for init form: Access Denied: Make sure your user has permission to read <path>/<formname>.xdp from the registry." I click OK and review the settings and there is no value beside "schema rootnode". Also, when I use the XPATH expression builder, I can't access the form level nodes because they aren't there.<br /><br />I beleive this error occurs because I don't have an embedded schema in my form. Am I right? I can create an XML file be exporting the data with Acrobat, but what should I do with it to create a schema (I'm an XML nOOb, and my XML text talks about DTDs)? If I am wrong, how do I get my form level nodes to appear in the XPATH expression builder?<br /><br />Thanks.
11 Replies

Avatar

Level 9
Hi



Yes, you're correct, you need an embedded schema.



I suggest using XML Spy to create your schema (doing this by hand is very painful).

You can download a "Home" edition (non-commercial use only) at:

http://www.altova.com/download/2006/default.asp?product=x&edition=h&os=any&server=us



Another way to do this without creating a schema is to export your form as XML, and then embed it into the Init Form definition. You do this from the init form definition palette in Workflow Designer (the same place that you specify the path and datatype of your init form). Workflow can use the XML file to work out what the default designer schema is, even if you don't explictly create one.



Good luck...



Howard



Howard Treisman

Avoka Technologies

Specializing in Custom QPAC development and LiveCycle Solutions

http://www.avoka.com/avoka/qpac_library.shtml

Avatar

Level 9
PS When you design your schema, you need to a create an XML Schema (.xsd file), NOT a DTD.

Avatar

Not applicable
Thanks for responding Howard.

My problem now is this. I've created an XSD file using XMLSpy but when I try to save it, I get a warning saying that "This schema doesn't appear to be valid by itself (as part of another schema, it might still be OK). No namespace URI is known for prefix 'xfa' within the current scope". The line that the curser goes to is this: and the words "xfa:dataNode" is highlighted.

How can I get my XSD file in a valid state?

Avatar

Level 9
Hi<br /><br />Why are you using the xfa namespace prefix. You should not need to use any namespaces.<br /><br />Here's an example of a simple schema - import this into XML spy, and then just extend it to add your own elements.<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><br /> <xs:element name="simple"><br /> <xs:annotation><br /> <xs:documentation>Comment describing your root element</xs:documentation><br /> </xs:annotation><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element name="field1" type="xs:string"/><br /> <xs:element name="field2" type="xs:string"/><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /></xs:schema><br /><br />Good luck...<br /><br />Howard<br /><br />Howard Treisman <br />Avoka Technologies <br />Specializing in Custom QPAC development and LiveCycle Solutions <br />http://www.avoka.com/avoka/qpac_library.shtml

Avatar

Not applicable
The reference to the namespace is there because XMLSpy generated it.



My form is quite complicated with many dynamic aspects (not to mention the 200 or so fields) so I'm heavily leaning away from writing this the old fashioned way (I was told that it could be painful:)). Furthermore, I am new to XML, so it would delay an already delayed project.



I will have a look at the Schema that you provided... maybe I can take some of the nodes from the old and move it too the new and get things done fairly quickly....



Thanks for responding.

Avatar

Level 9
Hi



I'm not sure why XMLSpy created the xfa:dataNode entry - this is an Adobe-defined namespace, which you shouldn't need to use (and which XML spy would not be aware of unless you specifically requested to use it?)



If you just go File/New... and select XML schema, you should get a new blank schema that you can just start extending.



What do you mean by "the old fashioned way"?



Howard



Howard Treisman

Avoka Technologies

Specializing in Custom QPAC development and LiveCycle Solutions

http://www.avoka.com/avoka/qpac_library.shtml

Avatar

Not applicable
As Howard, mentioned, there really is no reason to be using the xfa namespace in your schema. But if you really don't want to remove it, take a look at any xml schema tutorial on the web for "xmlns". You can use any random URI you want, even though the xfa schema will not be located there. It's not the best solution but it will work.



Btw, you do not NEED a schema to reference form fields in your xpath expessions. You just need it to be able to click on the node and have the builder create the xpath for you.



Chris Trubiani

Adobe Enterprise Developer Support

Avatar

Level 9
Hi Hubert



Re: not using a schema at all...



What about that initial problem "Attempting to load Schema for init form: Access Denied:" - what would be causing that? Any ideas



Howard

Avatar

Not applicable
Oops, sorry, jumped in late without checking out the original issue.



The problem has nothing to do with having a schema embedded in the form, that only affects whether or not the fields will appear in the gui of the xpath builder (you can still reference them by manually typing).



The problem is exactly what the error message says. The user being used to design the workflow does not have permissions to access the form stored in the registry. After a quick test it looks like the user needs to have the "LiveCycle Form Manager Administrator" role.



To change the roles, in the adminui, go to Settings->User Management->Users And Groups. Click find. Select the user. Click Assign Role. Select the role. Click Ok.



Chris



Chris Trubiani

Adobe Enterprise Developer Support

Avatar

Not applicable
The user I am using is a user that I created from a copy of the default administrator account (I called it wfadmin) that ships with Windows Server 2003. Within workflow, the wfadmin user is both a LiveCycle Workflow Process Developer and a LiveCycle Workflow Process Administrator.



I was given a solution to part of original issue. The following set of instructions are compliments of Carman. Thanks Carman.



1. Log in to http://localhost:8080/adminui

2. Select "Services"

3. Select "Adobe LiveCycle Form Manager"

4. Select "File Access" Notice in the "Access Rights box to the right, there is a "MetadataRead" permission which defaults to "checked" and a "Read" permission which defaults to "not checked"

5. Click on your form in the left "Repository" area

6. Notice that your form does not have a checkmark under Access Rights in the Permissions section for the "Read" attribute. Place a check-mark there, and the problem will go away after you click "Save"



This cured the error that WF Designer throws when adding the init form variable.



Howard: "the old fashioned way" = writing manually pen & paper style as opposed to generating a file.

Avatar

Not applicable
Create an XSD file and embed that XSD Schema file with form and make the data connection with each field. that will surely work.

You can download some tools from net to create XSD file