cancel
Showing results for 
Search instead for 
Did you mean: 

Only in IE: user not authorized when completing task via OData service

Former Member
0 Kudos

Hi there,

sorry again for posting so many questions, but I'm really lost...

I have a SAPUI5 application to approve/decline tasks...

UsingFirefox/Chrome it works without problems.

But some users are facing issues when using IE (most probably it's only IE9).

They're not able to complete the task, whereas claiming the task works (this is done when the first view is launched).

If they use Firefox it works for them!


And even more strange is the fact that it also works in IE if I nominate the user as task owner before the application is launched.

That's really weird, because the user was already the task owner before!

This is what I see in the log (see also attachment for further details):


com.sap.bpm.odata.exception.BPMODataException: The current user is not authorized to complete task

The user definitively has sufficient rights to complete task. Otherwise it would not work with other browsers.

Maybe it has something to do with my OData model:


var taskDataSvcURL = "/bpmodata/taskdata.svc/" + taskId;

var oDataModel = new sap.ui.model.odata.ODataModel(taskDataSvcURL, true, false);

The task is completing by the following code:


// Create output data

var outputData = {};

var approveRequestType = {};

// Fill status

var status = {};

status.Action = action;

status.ChangedOn = getCurrentTimestamp();

status.Details = details;

status.ChangedBy = getUser();

// Set status

approveRequestType.Status = status;

outputData.ApproveRequestType = approveRequestType;

//Call BPM OData service

oDataModel.create("/OutputData", outputData, null, fSuccess, fError);

Thanks in advance.

Best regards,

Thorsten.

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member445109
Active Participant
0 Kudos

Hi All

I am also facing the issue when i try to click on "Open task" button of My Inbox 2.0 from IE11, it is displaying Fiori logon page instead of opening html gui.

Please let me know if any one has solution for this.

Regards

Srinu

shailesh1
Explorer
0 Kudos

Did you find solution for this?

We are also facing the same issue. Here the application is opened in chrome but in tablet. Whereas when we try on desktop, its working fine.

Issue is seen when the application is launched in tablet/mobile.

former_member219126
Discoverer
0 Kudos

This message was moderated.

former_member191643
Active Contributor
0 Kudos

Hi Thorsten,

While working with UI5, it is always preferable to work with Firefox or Chrome browsers.
UI5+IE is a very unstable combination.

Tried and Tested.

Regards,

Sid

Former Member
0 Kudos

Siddhant Bhatankar wrote:

Hi Thorsten,

While working with UI5, it is always preferable to work with Firefox or Chrome browsers.
UI5+IE is a very unstable combination.

Tried and Tested.

Regards,

Sid

I know,  but unfortunately that doesn't help much!

IE is the official supported browser in our company...

I've now found out that for the user facing this issue, it works as soon as the Developer Tools (F12) are enabled.

If I restart IE again (without pushing F12), it doesn't work again!

Could it be that some settings change as soon as IE Developer Tools are enabled via F12?

Thanks in advance.

abdulbasit
Active Contributor
0 Kudos

It looks like a cache issue. When you open developer tools, it is probably disabling caches and working fine. Try refreshing caches on the client side try again.

Former Member
0 Kudos

Abdulbasit Gulsen wrote:

It looks like a cache issue. When you open developer tools, it is probably disabling caches and working fine. Try refreshing caches on the client side try again.

Hm, but I also faced this issue in IE InPrivate mode.

There the Cache should be disabled.

So I'm really lost!!!

abdulbasit
Active Contributor
0 Kudos

Check if the document mode changes when you open developer tools. Some scripts might not be working in all document modes.

Is is clear that the problem is on the client side. Did you compare the data you are posting ? (you may use fiddler in IE to see data)

former_member201781
Participant
0 Kudos

Hello Thorsten,

Did you ever find the solution to this?  We are having the same problem, as soon as F12 is hit in IE, things seem to work again. 

Appreciate any inputs

--Jamie

Former Member
0 Kudos

Hi,

I've just found out today that claiming the task doesn't work on some Internet Explorers (IE9 and IE11).

And that's why task completion is afterwards forbidden!

I claim the task via this code (actually I do the same as in his blog 😞


var tasksSvcURL = "/bpmodata/tasks.svc";

var tasksoDataModel = new sap.ui.model.odata.ODataModel(

        tasksSvcURL, false);

     

var taskId = getValueOfURLParameter("taskId");

oTasksoDataModel.create("/Claim?InstanceID='" + taskId

        + "'", null, null, fSuccess, fError);

     

function fSuccess(oEvent) {

    console.log("Task claimed successfully!");

};

function fError(oEvent) {

    console.log("Error occured when claiming the task!");

};

The strange thing is that the function fError is not processed, but nevertheless the BPM task is not claimed.

If I nominate the person manually in NWA before the user runs the application, then the task completion is possible!

What could be the reason that task claiming does not work?

It doesn't occur on all Internet Explorer versions (e.g. I've never faced the problem with my IE10!)...

Could it be a security setting?

Best regards,

Thorsten.

Former Member
0 Kudos

Is it possible that in IE the status.ChangedBy is not being filled? Have you checked if outputData is correctly filled with all the required data?

Maybe you have to use this.getUser();  instead of getUser();  ?

Former Member
0 Kudos

Hi Stephanie,

getUser() is a function contained in file utils.js...

It's added in index.html:


<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />

<script src="utils/utils.js"></script>

<script src="/sapui5/resources/sap-ui-core.js" id="sap-ui-bootstrap"

    data-sap-ui-libs="sap.m, sap.ui.commons"

    data-sap-ui-theme="sap_bluecrystal"

    data-sap-ui-resourceroots='{

                "sap.ui.approverequest" : "./",

                "approverequest" : "./approverequest"

                }'

    >

...