Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • PWS Get:  the facet given below in for TQL Engine Version 1.0.5 or greater.

    Code Block
    languagexml
    titlePWS GET Facet
    linenumberstrue
    <ThingFacet Name="PWSConnectionFacet">
        <String Format="$ObjectFormat(xml)" KnownBy="PWSConnectionAction" Name="ReceivedData" update="auto"/>
        <String Name="URL"/>
        <Action Name="PWSConnectionAction">
            <Workflow Limit="1" Live="1" Timeout="-1">
                <Task name="Main" while="true">
                    <Event as="ActionArgument" name="Argument"/>
                    <Invoke get="phttppws://?URL=[%:Event.Argument.URL.Value:%]&amp;" name="InvokePwsSubscription" scope="process" waitFor="Argument">
                        <Headers/>
                        <Cookie/>
                    </Invoke>
                    <Output As="ActionResult" Name="Result">
                        <Value>
                            <ReceivedData>
                                <Include>
    								Invoke.InvokePwsSubscription.Message.Value
                                </Include>
                            </ReceivedData>
                        </Value>
                    </Output>
                </Task>
            </Workflow>
        </Action>
    </ThingFacet>   
    Code Block
    languagexml
    titlePWS GET Query
    linenumberstrue
    <Query>
        <DeleteAll>
            <PwsGetModel>
                <pwsID ne=""/>
            </PwsGetModel>
        </DeleteAll>
        <Create>
            <PwsGetModel>
                <ReceivedData>$Null()</ReceivedData>
                <URL>ws://localhost:8080/fid-loggerfacet</URL>
            </PwsGetModel>
        </Create>
    </Query>
    Code Block
    languagexml
    titlePWS POST Facet
    linenumberstrue
    <ThingFacet Name="PwsPostConnectionFacet">
        <String Format="$ObjectFormat(xml)" KnownBy="PwsPostConnectionAction" Name="ReceivedData" update="auto"/>
        <String Name="URL"/>
    	<String Name="Payload"/>
        <Action Name="PwsPostConnectionAction">
            <Workflow Limit="1" Live="1" Timeout="-1">
                <Task name="Main" while="true">
                    <Event as="ActionArgument" name="Argument"/>
                    <Invoke name="InvokePwsSubscription" post="phttppws://?URL=[%:Event.Argument.URL.Value:%]&amp;" scope="process" waitFor="Argument">
                        <Headers/>
                        <Cookie/>
                        <Message>
                            <Value>[%:Event.Argument.Payload.Value:%]</Value>
                        </Message>
                    </Invoke>
                    <Output As="ActionResult" Name="Result">
                        <Value>
                            <ReceivedData>
                                <Include>
    								Invoke.InvokePwsSubscription.Message.Value
                                </Include>
                            </ReceivedData>
                        </Value>
                    </Output>
                </Task>
            </Workflow>
        </Action>
    </ThingFacet>   
    Code Block
    languagexml
    titlePWS POST Query
    linenumberstrue
    <Query>
        <DeleteAll>
            <PwsPostModel>
                <pwsID ne=""/>
            </PwsPostModel>
        </DeleteAll>
        <Create>
            <PwsPostModel>
                <ReceivedData>$Null()</ReceivedData>
    			<Payload>Hello World</Payload>
                <URL>ws://localhost:9090</URL>
            </PwsPostModel>
        </Create>
    </Query>

...