Skip to Content
avatar image
Former Member

How to run scheduled jobs with SFSF Extension Account, Destination can't be found

Hello everyone,

Anyone already has used the ConnectivityConfiguration API ?

I need execute scheduled jobs and accordingly with sap.help I should use the authentication method with SAML2BearerAssertion using a technical user

I supplied the --technical-user-id in command neo hcmcloud-create-connection and the destination was created in subscription level

The application is supplied via subscription

In Java application, reading the documentation I tried this code, even with the destination created in sub account the result always is null ...

Context ctx = new InitialContext(); 
localConnectivityConfiguration = (ConnectivityConfiguration) ctx.lookup("java:comp/env/connectivityConfiguration");
localConnectivityConfiguration.getConfiguration("name of destination");

I also tried the method getConfiguration(String accountID, String DestinationName) with no success

Context ctx = new InitialContext(); 
localConnectivityConfiguration = (ConnectivityConfiguration) ctx.lookup("java:comp/env/connectivityConfiguration");
localConnectivityConfiguration.getConfiguration("AccountID", "name of destination");

How can i run the scheduled jobs in host and access destinations from consumer subaccount ?

accordingly with documentation ...

If you have two destinations with the same name, one configured on subaccount level and the other on application level, the getConfiguration() method will return the destination on subaccount level. The preference order is: subscription level -> subaccount level -> application level.

But this is not happening ...

Anyone already implemented scheduler with subscriptions or have faced something similar?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 02 at 01:18 PM

    Hi Murilo,

    Have you seen this blog?

    When you schedule a task in Java, your application needs to execute the Destination API methods on a particular tenant (sub-account) in order to find the configuration. Check the Tenant API documentation.

    So first you get the available subscriptions to your "global account" and later you call execute method with a callable object that will perform the calls to the destination API to retrieve the sub-account destinations and from there run any relevant Tasks.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded