TcConnector set bypass

0
Hello all, I’m working with the TcConnector (Teamcenter) and I need to set the bypass to do an action. I tried to do it myself but it doesn’t work. I used the “Call Teamcenter Service” widget with the service: “Core-2007-12-Session/setUserSessionState” I created the setUserSessionState JSON file which look like:   { "ServiceOperation": "Core-2007-12-Session\/setUserSessionState", "InputType": "Digitops.UserSession", "ResponseType": "TcConnector.ServiceResponse", "ObjectMapping": "", "OperationInput": { "pairs": [{ "name": "$Input\/name", "value": "$Input\/value" }] }, "OperationResponse": "$Response\/TcConnector.ResponseData" }   I created en entity: UserSession with 2 attributes: name and value and I used this entity as input of the “Call Teamcenter Service” with values: name=’bypassFlag’ and value=’true’.   When I run the application, there is no error but the bypass is not checked… Could you help me?
asked
5 answers
0

I tried to use a list of UserSession.

So here is my new Datamodel:

and my new JSON:

{
    "ServiceOperation": "Core-2007-12-Session\/setUserSessionState",
    "InputType": "Digitops.ListOfUserSession",
    "ResponseType": "TcConnector.ServiceResponse",
    "ObjectMapping": "",
    "OperationInput": {
        "pairs": ["$Input\/Digitops.ListOfUserSessions"]
    },
    "OperationResponse": "$Response\/TcConnector.ResponseData"
}

 

But I have the same result…

Please help !!!

answered
0

Looking at the RAC Communication Monitor view, I see the following for this operation:

[Call]  TC11.03454.01.ed.00050 Core-2007-12-Session:setUserSessionState (214 bytes)

<?xml version="1.0" encoding="UTF-8"?>

<SetUserSessionStateInput xmlns="http://teamcenter.com/Schemas/Core/2007-12/Session">

    <pairs name="bypassFlag" value="1"/>

</SetUserSessionStateInput>

 

Have you tried setting the value to “1” rather than “true”?

answered
0

This is the OperationMapping I have used for this:

{

    "ServiceOperation": "Core-2007-12-Session\/setUserSessionState",

    "InputType": "MyFirstModule.setUserSessionStateInput",

    "ResponseType": "",

    "ObjectMapping": "",

    "OperationInput": {

        "pairs": [

            {

                "name": "$Input\/name",

                "value": "$Input\/value"

            }

        ]

    },

    "OperationResponse": {}

}

 

answered
0

Is it working for you?

I have exactly the same things and it doesn’t work:

my Operation mapping:

{
    "ServiceOperation": "Core-2007-12-Session\/setUserSessionState",
    "InputType": "Digitops.setUserSessionStateInput",
    "ResponseType": "TcConnector.ServiceResponse",
    "ObjectMapping": "",
    "OperationInput": {
        "pairs": [{
                "name": "$Input\/name",
                "value": "$Input\/value"
        }]
    },
    "OperationResponse": "$Response\/TcConnector.ResponseData"
}

 

My datamodel:

The microflow I use:

 

But it doesn’t work…

answered
0

This works for me

{
    "ServiceOperation": "Core-2007-12-Session\/setUserSessionState",
    "InputType": "MyFirstModule.setUserSessionStateInput",
    "ResponseType": "",
    "ObjectMapping": "",
    "OperationInput": {
        "pairs": [
            {
                "name": "$Input\/name",
                "value": "$Input\/value"
            }
        ]
    },
    "OperationResponse": {}
}

answered