cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Hidden AddStreamEntry() Permission?

Ike@ACE
15-Moonstone

Hidden AddStreamEntry() Permission?

I've hit a wall with this. I've been trying to get the wrapper service that I wrote to work for a non-Administrative user for 16 hours now. It's always been the same problem. Something about the AddStreamEntry() service inside of my wrapper is causing problems. I've come to the conclusion that there is some hidden permission that I need to put in place for regular users, because Administrative users have no problem with getting the wrapper to work. Here's the wrapper service in question:

 

Inputs: string command; string pointer;

// result: INFOTABLE
let values = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: undefined /* STRING */,
dataShapeName: 'MasterChildStreamDS' /* DATASHAPENAME */
});

values.Command = command;
values.PointerData = pointer;

me.AddStreamEntry({ //This is the line the ScriptLog points at for the error
sourceType: undefined /* STRING */,
values: values /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */,
timestamp: undefined /* DATETIME */
});

// result: INFOTABLE dataShape: ""
let streamEntries = me.GetStreamEntries({
oldestFirst: false /* BOOLEAN */,
maxItems: undefined /* NUMBER */
});

me.timestamp = streamEntries.rows[0].timestamp;

 

Here's the permissions I've set:

 

Visibility: 'MasterChildStreamDS'; 'InfoTableFunctions';
PropertyRead: timestamp;
PropertyWrite: timestamp;
ServiceExecute: CreateInfoTableFromDataShape(); AddStreamEntry(); GetStreamEntries();

 

Is there something I'm missing? 'Cause I can't find it. Thanks in advance or any help.

ACCEPTED SOLUTION

Accepted Solutions
Velkumar
19-Tanzanite
(To:Ike@ACE)

Hi Ike@ACE 

 

Please refer to this article - Article - CS276163 - UpdateStreamEntry and AddStreamEntry services fail with error Access was attempted on a null reference variable in ThingWorx (ptc.com)

 

Provide permission to the resource/entity mentioned in the article and try again 

 

/VR

View solution in original post

2 REPLIES 2

  • What is the error you receive?
  • You also need visibility for the asset and valuestream of the asset
Velkumar
19-Tanzanite
(To:Ike@ACE)

Hi Ike@ACE 

 

Please refer to this article - Article - CS276163 - UpdateStreamEntry and AddStreamEntry services fail with error Access was attempted on a null reference variable in ThingWorx (ptc.com)

 

Provide permission to the resource/entity mentioned in the article and try again 

 

/VR

Announcements


Top Tags