"Form Closed" while accessing the tasks form

Hi.

I have been trying to learn to use Workflows together with InfoPath forms.

I started out with the tutorial fromNick Swan's Blogg (a summary of the info on the MSDN site).

What i have been trying to do differently is that instead of publishing the forms on a network location i have been posting the two forms in Document libraries.

But my problem now comes when i try to perform the task that i have assigned after filling out the first form(check "finished" and submit in the second form).

when i click the task, i get the message "The specified form cannot be found." and subsequent tries give the "the form has been closed" message.

in the workflow.xml i have these entries:

<Elements xmlns="...
<Workflow
Name="...
Description="...
Id="...
CodeBesideClass="...
CodeBesideAssembly="...
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
>
<Categories/>
<MetaData>
<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:WorkflowTutorial:-myXSD-2007-03-21T10-07-33</Task0_FormURN>
</MetaData>
</Workflow>
</Elements>

As far as i have understood the Task0_FormURN tag is what identifies the Form the workflow will load when i click the task.

I also have a copy of the IPform in the ....12/TEMPLATES/FEATURES/name folder although i dont believe it should be neccesary.

Do i need something else? or am i off the track in another way? If anyone knows what i am doing wrong please give me a hint or two.

Best regards. Sigge.

[1917 byte] By [SiggePersson] at [2008-1-1]
# 1

Hi,

When you deploy your workflow-dll to the feature-catalogue you also have to deploy the .xsn-file. You also have to verify that your feature.xml will register the form in infopath.

The form also have to be workflow-enabled

Regards,
Daniel

DanielKarlsson at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 2

Thank you.

I'll look into that and see if it helps.

Sigge.

SiggePersson at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 3

Ok, lets see.

when you say workflow-dll i suspect you mean where i place the feature.xml and workflow.xml ...12/TEMPLATES/FEATURES/TestWorkflow/ i have the WorkflowTutorial.xsn file there.

And my Feature.xml now have this entry added to it.

<Property

Key="WorkflowTutorial"

Value="*.xsn"/>

But to be honest, i dont know what you mean by "The form also have to be workflow-enabled".

I have looked through the settings in InfoPath, and the Form Library settings. but i havent found anything that i believe is what you mean. Can you expand on that?

Thanks in advance. Sigge

SiggePersson at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 4

Hello Sigge

To be workflow enabled your form must have a unique urn, recieve a ItemMetadata.xml when loading and post ItemMetadata.xml to host while closing the form when done.

In the feature.xml it should say <Property Key="RegisterForms" Value="*.xsn"/> since this will register all your form and mark them as workflow enabled.

Please note that several workflows can share forms, in one of my current projects I have a separate feature just for all the forms.

Best of luck.

Daniel Karlsson, Connecta AB

DanielKarlsson at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 5

If you specify this:

<Property Key="WorkflowTutorial" Value="*.xsn"/>

Then your forms also have to be in ...12/TEMPLATES/FEATURES/TestWorkflow/ . Once you run install.bat again you should see the forms in 'Central Administration' -> 'Application' -> 'Manage Form Templates' section and they should be ready and workflow enabled. Then in your document library you can add the workflow and your forms will be available. That is, provided that everything else that you did are correct.

FrankChiang at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 6
hello Frank,
i did everything fine,
but when i try to add my workflow, immediately browser showing that
"the form hgas been closed"

and some times it is showing

The following location is not accessible, because it is in a different site collection:
urn: schemas-microsoft-com: office:infopath:AssocForm11:-myXSD-2007-04-19T05-18-41

in my error log i found the message like

MetaInformationByUrl:CrossSite check failed for site URL=http://dev:8074 and file URL=: urnTongue Tiedchemas-microsoft-comSurpriseffice:infopath:AssocForm11:-myXSD-2007-04-19T05-18-41 4de9e8a4-9587-485f-ab04-999840b3490d

i m not able to find the solution, i tried hard, i wasted my time alot

please help me abt the issue

thanks in advance
praveen

Praveenbattula at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 7
if you get form closed message means there is a problem with your infopath form ,
1. Problem with form urn's
2. Problem with datasource.
3. make sure that the infopath form is browser compatible

make sure that both r given correctly,

thanks

Praveenbattula at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 8

Had same problem. Solution was unexpected (at least for me)

If I write form urn in workflow.xml this way:

Code Snippet

<MetaData>

<Task0_FormURN>

urn:schemas-microsoft-com:office:infopath:Incom-SharePoint-ApprovalForm:-myXSD-2007-05-18T07-16-58

<</< FONT>Task0_FormURN>

...

And then try to open form, I get error:

Code Snippet

The following location is not accessible, because it is in a different site collection:

urn:schemas-microsoft-com:office:infopath:Incom-SharePoint-ApprovalForm:-myXSD-2007-05-18T07-16-58

If I write form urn this way:

Code Snippet

<MetaData>

<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:Incom-SharePoint-ApprovalForm:-myXSD-2007-05-18T07-16-58</Task0_FormURN>

...

Everything works fine

KurochkaAndrew at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 9
actually i found out that my problem was when i accessed the data from the form i used a binarystream that somehow interfered with something else in the workflow. if accessed the needed data in a different way it worked fine, thank you for you help though.
SiggePersson at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...
# 10
create a form which contains same data as ApprovalForm and do same procedure(set datasource, publish, design checker etc), and use this formURN in workflow.xml and deploy it.

at very first time i developed workflows, i deployed myform on http://localhost:8050, later i deployed it to http://localhost:8051, it got the same message,

thanks

Praveenbattula at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...

SharePoint Products and Technologies

Site Classified