Scott Woodgate's OutBursts

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.

Published Friday, April 23, 2004 7:03 PM by scottwoo

Comments

 

abbas foroughi said:

InfoPathTaskPatchingPipeline.zip is not working!
April 24, 2004 6:34 AM
 

Scott Woodgate (MSFT) said:

Can you provide more details of the issue you are experiencing?
April 24, 2004 9:52 AM
 

abbas foroughi said:

I can't download this component. I get an application error: HttpException Resource not found.

http://blogs.msdn.com/scottwoo/archive/2004/04/23/home.comcast.net/%20~sdwoodgate/InfoPathTaskPatchingPipeline.zip
April 24, 2004 10:03 AM
 

Scott Woodgate (MSFT) said:

Ah... sorry about that. All fixed :)
April 24, 2004 1:32 PM
 

Panchy said:

Just curious -- why is interop still being used? Would be nice to have the references needed (browsing the list and/or guessing is longish).
April 26, 2004 2:48 AM
 

Prashant said:

I still get :
application error: HttpException Resource not found
April 26, 2004 9:59 AM
 

abbas foroughi said:

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.
April 26, 2004 2:00 PM
 

Rick Severson (MSFT) said:

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.
April 27, 2004 6:44 AM
 

abbas foroughi said:

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.

April 27, 2004 9:58 AM
 

Panchy said:

Getting back to the pipeline component for a sec, I'm getting:
The referenced component 'Microsoft.BizTalk.Pipeline' could not be found ...
... when opening HwsInfoPathPipelineComponent.csproj
in VS.NET.
Can anybody let me know how to resolve that so I can build the component as described in Lab 12? Any other clues that would help resolve other discrepancies, like -- where is SendPipeline1.btp? -- for example would be appreciated.
April 28, 2004 4:12 AM
 

InfoPath Team Blog said:

April 29, 2004 12:17 PM
 

Rick Severson said:

An updated lab will be posted on MSDN shortly.
April 29, 2004 9:31 AM
 

Rick Severson said:

The pipeline refrence should be to <BizTalkDir>\Microsoft.BizTalk.Pipeline.dll
April 29, 2004 10:46 AM
 

Rick Severson said:

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.
April 29, 2004 10:53 AM
 

Ravi said:

1. 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>
May 9, 2004 6:29 PM
 

Rick Severson said:

The new hands on lab 12 is now available on msdn. The .cs file is in odc_INF03_Labs2.exe.
May 13, 2004 9:57 AM
 

Damon Kelly said:

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?
June 2, 2004 6:34 PM
 

Damon Kelly said:

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?
June 9, 2004 8:28 PM
 

hasan said:

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.
June 24, 2004 11:47 PM
 

Tommy Jacobsen said:

Damon how did you solve this problem

'Microsoft.BizTalk.Hws.SoapService.HwsServiceSoapException: You cannot
access this activity flow, action or task.'
June 29, 2004 6:17 AM
 

dianying xia zai said:

July 26, 2004 12:12 AM
New Comments to this post are disabled

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker