Corrections to InfoPath/HWS Example (look below in my blog)
A. It asks you to define a Status element in the ActionSection:
1. Right-click the ActionSection node, click Insert Schema Node, and then click Child Field Element.
2. In the placeholder node that appears, type Status.
it should be renamed to “TaskStatus” because in the hwsAdapters it refers to ActionSection/TaskStatus, instead of ActionSection/Status
B. You need a component for the pipeline. You can get this component here
Hopefully the InfoPath Team will fix this on the main page shortly.
Comments
- Anonymous
April 23, 2004
InfoPathTaskPatchingPipeline.zip is not working! - Anonymous
April 24, 2004
Can you provide more details of the issue you are experiencing? - Anonymous
April 24, 2004
The comment has been removed - Anonymous
April 24, 2004
Ah... sorry about that. All fixed :) - Anonymous
April 25, 2004
Just curious -- why is interop still being used? Would be nice to have the references needed (browsing the list and/or guessing is longish). - Anonymous
April 26, 2004
I still get :
application error: HttpException Resource not found - Anonymous
April 26, 2004
Please can you suggest how to debug the following error:
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
The form definition (.xsf) file has an invalid mapping from the document to the submit Web service.
I have added the following code to the manifest.xsf
<xsf:hwsWorkflow taskpaneVisible="yes">
<xsf:location url="abc"></xsf:location>
<xsf:allowedActions>
<xsf:action name="Approval" actionTypeID="40D13DD6-0CE0-1EEC-07CE-1738B79022B9" canInitiateWorkflow="yes" caption="Start Approval"></xsf:action>
</xsf:allowedActions>
<xsf:allowedTasks>
<xsf:task name="RespondToApproval" taskTypeID="http://tempuri.org/Hws_Task_Approval" caption="Respond To Approval"></xsf:task>
</xsf:allowedTasks>
</xsf:hwsWorkflow>
<xsf:dataAdapters>
<xsf:hwsAdapter name="Approval" wsdlUrl="http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL" submitAllowed="yes" queryAllowed="no">
<xsf:hwsOperation type="addActionToNewActivityFlow" typeID="40D13DD6-0CE0-1EEC-07CE-1738B79022B9" serviceUrl="http://localhost/hwsservice/hwsservice.asmx?op=GetActivityList">
<xsf:input source="Activation.xml">
<xsf:partFragment match="ActionSection/Target" replaceWith="/my:myFields/my:Target"></xsf:partFragment>
<xsf:partFragment match="ActionSection/Description" replaceWith="/my:myFields/my:Description"></xsf:partFragment>
<xsf:partFragment match="ActionSection/TaskStatus" replaceWith="/my:myFields/my:TaskStatus"></xsf:partFragment>
<xsf:partFragment match="ActionSection/EndAction" replaceWith="/my:myFields/my:EndAction"></xsf:partFragment>
</xsf:input>
</xsf:hwsOperation>
</xsf:hwsAdapter>
<xsf:hwsAdapter name="ExtendApproval" wsdlUrl="http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL" submitAllowed="yes" queryAllowed="no">
<xsf:hwsOperation type="addActionToActivityFlow" typeID="40D13DD6-0CE0-1EEC-07CE-1738B79022B9" serviceUrl="http://localhost/hwsservice/hwsservice.asmx">">http://localhost/hwsservice/hwsservice.asmx">
<xsf:input source="Activation.xml">
<xsf:partFragment match="ActionSection/Target" replaceWith="/my:myFields/my:Target"></xsf:partFragment>
<xsf:partFragment match="ActionSection/Description" replaceWith="/my:myFields/my:Description"></xsf:partFragment>
<xsf:partFragment match="ActionSection/TaskStatus" replaceWith="/my:myFields/my:TaskStatus"></xsf:partFragment>
<xsf:partFragment match="ActionSection/EndAction" replaceWith="/my:myFields/my:EndAction"></xsf:partFragment>
</xsf:input>
</xsf:hwsOperation>
</xsf:hwsAdapter>
<xsf:hwsAdapter name="RespondToApproval" wsdlUrl="http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL"">http://localhost/hwsservice/hwsservice.asmx?WSDL" submitAllowed="yes" queryAllowed="no">
<xsf:hwsOperation type="sendTaskResponse" typeID="http://tempuri.org/Hws_Approval" serviceUrl="http://localhost/hwsservice/hwsservice.asmx">">http://localhost/hwsservice/hwsservice.asmx">
<xsf:input source="">
<xsf:partFragment match="HwsSection/TaskStatus" replaceWith="/my:myFields/my:TaskStatus"></xsf:partFragment>
<xsf:partFragment match="ActionSection/EndAction" replaceWith="/my:myFields/my:EndAction"></xsf:partFragment>
</xsf:input>
</xsf:hwsOperation>
</xsf:hwsAdapter>
and activation.xml includes:
<ns0:HwsMessage xmlns:ns0="http://tempuri.org/Hws_Task_Approval">
<HwsSection HwsMessageType="Hws_Task">
<ActivityFlowID/>
<TaskID/>
<TaskDescription/>
<ActionTypeID/>
<ActionInstanceID/>
<InitiatingActor/>
<ActorElementXPath/>
<TargetActor/>
<ActivityModelTypeID/>
<ActivityModelStepID>1</ActivityModelStepID>
<TaskProperties>
<Property Name="" Description="" Type=""/>
</TaskProperties>
<ActivityModelInstanceID/>
<HwsWebServiceUrl>http://localhost/HwsService/HwsService.asmx</HwsWebServiceUrl>
<TaskStatus>InProgress</TaskStatus>
<PercentageComplete>1</PercentageComplete>
<NumberOfResponses/>
<Reassignment>
<ReassignedByActor/>
<FromTaskID/>
</Reassignment>
</HwsSection>
<ActionSection>
<Target/>
<Description/>
<TaskStatus/>
<EndAction/>
</ActionSection>
<Payloads>
<Payload ID="ID_0"/>
</Payloads>
</ns0:HwsMessage>
Thanks
Abbas. - Anonymous
April 26, 2004
For the partFragment matches, the easiest fix is to change the partFragment matches in the AddActionToActivityFlow and AddActionToNewActivityFlow. The ActionSecton/TaskStatus should be ActionSection/Status. Or you can change the Activation.xml file to ActionSection/Status, but you must also change the Activation schema or else a schema validation error will occur.
The partFragment match in the SendTaskResponse can still be ActionSection/TaskStatus.
As a rule, the what Activation schema file defines is what should determine what used in the AddActionToNewActivityFlow and AddActionToActivityFlow adapters within the InfoPath manifest.xsf file.
What the Task schema file defines is what should determine what partFragment match is placed in the SendTaskResponse adapter within the InfoPath manifest.xsf file. - Anonymous
April 27, 2004
Rick,
Do you have any documentation for hwsAadpter?
I don't understand why I have to rename TargetStatus to Status:
My Hws_Activate_Approval.xsd schema is:
<xs:element name="ActionSection">
- <xs:complexType>
- <xs:sequence>
<xs:element name="Target" type="xs:string" />
<xs:element name="Description" type="xs:string" />
<xs:element name="TaskStatus" type="xs:string" />
<xs:element name="EndAction" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
Then I generated an activation xml in VS.NET and corrected the payloads section.
I also think the partFragment match in the SendTaskResponse should be HwsSection/TaskStatus as defined in Hws_Task_Approval.xsd
Do you have a working Sample?
Thanks
Abbas. - Anonymous
April 27, 2004
The comment has been removed - Anonymous
April 29, 2004
An updated lab will be posted on MSDN shortly. - Anonymous
April 29, 2004
The pipeline refrence should be to <BizTalkDir>Microsoft.BizTalk.Pipeline.dll - Anonymous
April 29, 2004
Abbas,
Do you mean TaskStatus to Status? The key is to have what is detailed in the Activation schema, match what is in the Activation.xml, to what is in the Match portion of the hwsAdapter.
The partFragment follows this logic:
The Activation.xml file is the source template that will be used in the SOAP message sent to the web service. Since HWS is expecting the Activation message to be in a format matching the Activation schema, the Activation.xml file ultimately sent must validate. Once InfoPath has the template activation file, it tries to determine if any values in the file need to be replaced by values out of the InfoPath document object model. These are the partFragment matches. In this example, it is replacing Target, Status, Description, and EndAction from the template file with values from the main dom.
In InfoPath, click the ? help icon. Click Table Of Contents. Click InfoPath Developer Reference (at the bottom of the list of links). Click InfoPath Object Model reference. Click Objects. Click HWSAdapter. Here you will find information on the HWSAdapter object for InfoPath. - Anonymous
May 09, 2004
- The web link (as against the MSDN link) has not been updated with the DeployActions.cmd script instructions.
http://www.msdn.microsoft.com/office/default.aspx?pull=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_12.asp
2. In the "Activating hwsWorkflow Within Manifest.xsf" section, the document tells you to replace the actionTypeID in Delegate action. Actually it should be the Approval action.
<xsf:action name="Delegate" actionTypeID="F8E1453A-0813-1E96-
D42C-FFC41C50E5C7" canInitiateWorkflow="no" caption="Delegate
Task"></xsf:action>
- Anonymous
May 13, 2004
The new hands on lab 12 is now available on msdn. The .cs file is in odc_INF03_Labs2.exe. - Anonymous
June 02, 2004
As well as the issue that Ravi noted above when setting up the sendTaskResponse adapter type for the hwsAdapter for
RespondToApproval it says to says to paste the partFragment match as
"HwsSection/Status" when it should be "HwsSection/TaskStatus".
I've now got most of this lab working, I can submit the infopath document
for approval, open up the document to approve it. The problem I now have is
when I try and 'respond to approval' I get:
'Microsoft.BizTalk.Hws.SoapService.HwsServiceSoapException: You cannot
access this activity flow, action or task.'
Error being thrown and in the event viewer I get:
You cannot access this activity flow, action or task.
Anyone got any thoughts on how to fix this and has anyone got this lab completly working? - Anonymous
June 09, 2004
Ok I've now got it working sort of!
I can now submit it from infopath, open it and approve it once. After the first time any additional attempts to approve additional submissions fail as I can't get the status when I open up the XML file.
I also know what's causing it to fail but not why this is happening. The problem is that any additional submissions for some reason are missing action target when I check the activity flow in HWSAdministration.
Does anyone have any idea what after the first time I do a submission on additional submissions the action targets are not recorded in HWSAdministration? - Anonymous
June 24, 2004
The new lab still doesn't seem to be available. I couldn't find odc_INF03_Labs2.exe on msdn. Rick Severson, could you please post a link to the new lab and file. - Anonymous
June 28, 2004
Damon how did you solve this problem
'Microsoft.BizTalk.Hws.SoapService.HwsServiceSoapException: You cannot
access this activity flow, action or task.' - Anonymous
July 25, 2004
dianying xia zai:http://www.kamun.com/
movie down:http://movie.kamun.com/
mp3 xia zai:http://music.kamun.com/
engage:http://club.kamun.com/