Re: [Dev] BPS and REST Web Service: filter tasks by category

2018-02-07 Thread Thomas LEGRAND
Hello Himasha,

OK, cool!

To make my thingy works, I made a workaround by using the "nameLike"
parameter.

Regards,

Thomas

2018-02-08 6:15 GMT+01:00 Himasha Guruge :

> Hi Thomas,
>
> It seems your observations are correct as [1] is missing the field
> 'category'. I have reported an issue at [2] so that this can be fixed in a
> future release.
>
> [1] https://github.com/wso2/carbon-business-process/blob/
> master/components/bpmn/org.wso2.carbon.bpmn.rest/src/
> main/java/org/wso2/carbon/bpmn/rest/model/runtime/TaskQueryRequest.java
> [2] https://github.com/wso2/product-ei/issues/1840
>
> Thanks,
> Himasha
>
> On Wed, Feb 7, 2018 at 7:15 PM, Thomas LEGRAND <
> thomas.legr...@versusmind.eu> wrote:
>
>> Hello,
>>
>> I am currently using the BPS 3.6.0 (via EI 6.0.0) and I have a user store
>> "US" in which I have two users: Toto and titi. Toto has the Internal role
>> "Role A" and Titi has the Internal role "Role B".
>>
>> My use case is to retrieve a list of tasks in which I set the "category"
>> with the value "PRIMO". One of the task has the groups "Role A" and "Role
>> B" but has only the user "Toto" as candidates. Because Tito has the "Role
>> B", so it should retrieve the task, too.
>>
>> But but but, I tried two ways to retrieve this task and they all failed:
>>
>> - The first one by using the Activiti Java API but I found out that I my
>> "identified" user is not really identified to be in the group because when
>> I check in the Activiti DB, I can't see any "Titi" in the table
>> ACT_HI_IDENTITYLINK. However, I can see "Internet/Role B" but... hey, this
>> is WSO2-only so I think I have to pass via the BPS WS.
>>
>> - The second one is to use the WSO2 BPS REST Web Service. My request in
>> the http://{{bps.server}}:{{bps.port}}/bpmn/query/tasks resources using
>> POST, as specified in the Activiti Documentation [1] :
>>
>> Request:
>> {
>> "candidateUser": "US/Titi",
>> "category": "PRIMO"
>> }
>>
>> Response:
>> {
>> "errorMessage": "Unrecognized field \"category\" (Class
>> org.wso2.carbon.bpmn.rest.model.runtime.TaskQueryRequest), not marked as
>> ignorable\n at [Source: org.apache.cxf.transport.http.
>> AbstractHTTPDestination$1@1a0a0f94; line: 3, column: 15] (through
>> reference chain: org.wso2.carbon.bpmn.rest.mode
>> l.runtime.TaskQueryRequest[\"category\"])",
>> "statusCode": 500
>> }
>>
>> Yep. It seems that some of the query parameter specified in the Activiti
>> documentation are not plugged-in to the WS implementation of WSO2.
>>
>> So, how can I update/fix the WSO2 web service part only without having to
>> install a new version of the EI? Or am I screwed to take a scenic route
>> with ugly workarounds to retrieve the tasks I want via the WS? :(
>>
>> Regards,
>>
>> Thomas
>>
>> [1] https://www.activiti.org/userguide/#_query_for_tasks
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Himasha Guruge
> Senior Software Engineer
> WS*O2* *Inc.*
> Mobile: +94 777459299 <+94%2077%20745%209299>
> himas...@wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] Personal information export API

2018-02-07 Thread Maduranga Siriwardena
Hi all,

Based on the discussions had offline we did few changes to the api. We have
come up with 3 endpoints.

/api/identity/user/v1.0/me
Get the personal information of authenticated user.

/api/identity/user/v1.0/pi-info/{userId}
Get the personal information of the user with the given id. Users with
"administrative" privileges can invoke this api. We need to decide what
level authorization needed for this operation.

/api/identity/user/v1.0/pi-info?username=
Get the user ids and usernames of the given username pattern. This might
not be implemented at the moment.

Thanks,
Maduranga.

On Wed, Jan 24, 2018 at 8:33 PM, Isura Karunaratne  wrote:

>
>
> On Wed, Jan 24, 2018 at 2:20 PM, Maduranga Siriwardena  > wrote:
>
>> If the user is in secondary userstore, fully qualified username contains
>> "/" character. But seems to be we can't send url encoded "/" characters
>> (%2F) in path parameters. We are evaluating possible solutions for this. If
>> this is not an option, we are planing to base 64 encode the username and
>> then url encode it.
>>
>> We already has a web application with name api#identity#user [1]. So we
>> are planing to use the same repository for this code also.
>>
>
> Yes. We can use the same application.
>
>>
>> [1] https://github.com/wso2-extensions/identity-governance/t
>> ree/v1.0.38/components/org.wso2.carbon.identity.user.endpoint
>>
>> Thanks,
>>
>> On Tue, Jan 23, 2018 at 10:40 AM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>>
>>>
>>> On Tue, Jan 23, 2018 at 10:35 AM, Omindu Rathnaweera 
>>> wrote:
>>>

 Hi Maduranga,

 On Tue, Jan 23, 2018 at 10:23 AM, Maduranga Siriwardena <
 madura...@wso2.com> wrote:

> Hi all,
>
> Web app name we have come up for this endpoint
> is api#identity#user#v1.0 and the path for the endpoint is
> /pi/users/{userId}. So the whole endpoint would be
>
>- for super tenant,
>
> /api/identity/user/v1.0/pi/users/{userId}
>
>
>- for tenant,
>
> /t/{tenant-domain}/api/identity/user/v1.0/pi/users/{userId}
>
>
> IMO  we can use following format,
>
> / t/{tenant-domain}/api/identity/user/v1.0/pi-info/{id}
>
>
> Thanks
> Isura.
>
>>
> Our initial plan was to use the ID used in Pseudonyms for username
> feature [1]. But as the ID used by Pseudonyms for username feature is not
> available to outside, we cannot use it here. Next option available to us 
> is
> the ID used in SCIM. But as it is not mandatory to have SCIM ID in system
> (when SCIM is disabled), we cannot use this option also.
>
> Because of above reasons, we are planing to use base 64 encoded fully
> qualified username as the userId in the above request.
>

 Would like to know the rationale behind base64 encoding the username.
 Also if it has to be b64 encoded for some reason then it should be base64
 URL encoded I believe.

>>>
>>> Yes this should be url encoding.
>>>


>
> Do you have any suggestions?
>
> [1] [Architecture] GDPR - Pseudonyms For Username
>
> Thanks,
>
> On Mon, Jan 22, 2018 at 5:52 PM, Hasintha Indrajee 
> wrote:
>
>> In a federated user scenario, we neither have user information nor
>> email address of the user in a case if the user is not JIT. Hence we 
>> won't
>> be able to share consents with user in an offline method. But still for
>> federated users we need to maintain consents which we give out to SPs. We
>> can process this offline and store somewhere (consent info ready for
>> download). The way we share will depend. eg - For the users who have 
>> emails
>> we can send them through an email (as a download link). If not we can 
>> share
>> those information through another medium (eg - user profile at a later
>> login)
>>
>> On Mon, Jan 22, 2018 at 5:40 PM, Ruwan Abeykoon 
>> wrote:
>>
>>> Hi Hasintha,
>>> We do not need to export anything we do not keep in our databases.
>>> Could you please explain further if we need to do anything extra for
>>> Federated case.
>>>
>>> Cheers,
>>> Ruwan
>>>
>>> On Mon, Jan 22, 2018 at 5:33 PM, Hasintha Indrajee <
>>> hasin...@wso2.com> wrote:
>>>
 Just a quick question. How are we going to cater consents for
 federated user ? Having consent from 3rd party IDP to IS will not be 
 enough
 AFAIU. If we are sharing those information through an SP we need to
 maintain those consents as well. WDYT ?

 In that case how can federated users download their consents ?

 On Mon, Jan 22, 2018 at 5:25 PM, Omindu Rathnaweera <
 omi...@wso2.com> wrote:

> Hi Maduranga,
>
> In the consent API we do not have the option to get multiple

Re: [Dev] OSGI bundle stopping mechanisms

2018-02-07 Thread Darshana Gunawardana
Hi Denuwanthi,

It's depend on the bundle type..

For an example, Oauth is a core bundle for a product like IS. So the
product should not start, if there are missing resources like required
database schemas.

Thanks,

On Tue, Feb 6, 2018 at 11:47 AM, Danesh Kuruppu  wrote:

> Hi Denuwanthi,
>
> We have a requirement where we need to interfere/stop the server start up,
>> if a certain condition is not fulfilled during the bundle startup.
>>
>> For that. is it ok to use following approach inside the bundle service
>> component if the particular condition is not met?
>> bundleContext.getBundle(0).stop();
>>
>
> Instead of shutting down osgi container completely, can we control this by
> not registering the service if certain condition is not satisfied. So
> inside bundle service component, we check the condition before registering
> the service. If the condition not satisfied, we return without registering
> the services.
>
> Thanks
> Danesh
>
>
>> Or is there any other proper  approach we can use?
>>
>> Thanks,
>>
>> --
>> Denuwanthi De Silva
>>
>>
>
>
> --
>
> *Danesh Kuruppu*
> Senior Software Engineer | WSO2
>
> Email: dan...@wso2.com
> Mobile: +94 (77) 1690552 <+94%2077%20169%200552>
> Web: WSO2 Inc 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,


*Darshana Gunawardana*Technical Lead
WSO2 Inc.; http://wso2.com

*E-mail: darsh...@wso2.com *
*Mobile: +94718566859*Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error in visualizing an execution plan

2018-02-07 Thread Pamoda Wimalasiri
Hi,

The following error occurred when visualizing an execution plan with a
customized javascript function.

[2018-02-08 11:11:53,907] ERROR
{org.wso2.carbon.event.processor.ui.executionPlan.flow.ExecutionPlanFlow}
-  Error in visualizing execution plan '/* Enter a unique ExecutionPlan */
@Plan:name('RiskScoreCalculator-AllowedIpRange-ip2-realtime1')

/* Enter a unique description for ExecutionPlan */
@Plan:description('Detect logins outside the allowed ip range')

define function ipToLong[JavaScript] return double {
var octetsOfIp = data[0].split(".");
var ipAddressAsLong = octetsOfIp[0]* 256 * 256 * 256
+ octetsOfIp[1]* 256 * 256
+ octetsOfIp[2] * 256
+ octetsOfIp[3] * 1;
return ipAddressAsLong;
};

/* define streams/tables and write queries here ... */

@Import('org.wso2.is.analytics.stream.ProcessedOverallAuthentication:1.0.0')
define stream ProcessedOverallAuthentication (meta_tenantId int, contextId
string, eventId string, eventType string, authenticationSuccess bool,
username string, localUsername string, userStoreDomain string, tenantDomain
string, remoteIp string, region string, inboundAuthType string,
serviceProvider string, rememberMeEnabled bool, forceAuthEnabled bool,
passiveAuthEnabled bool, rolesCommaSeparated string, authenticationStep
string, identityProvider string, authStepSuccess bool, stepAuthenticator
string, isFirstLogin bool, identityProviderType string, _timestamp long);

@Export('org.wso2.is.analytics.stream.SuspiciousLoginAttempt:1.0.0')
define stream SuspiciousLoginAttempt (meta_tenantId int, username string,
userStoreDomain string, tenantDomain string, remoteIp string, region
string, _timestamp long, message string);

from ProcessedOverallAuthentication[(authStepSuccess == true) AND
(eventType =='step') AND ipToLong(remoteIp) < ipToLong("123.56.7.8") OR
ipToLong(remoteIp) > ipToLong("123.9.9.1")]
select meta_tenantId, username, userStoreDomain, tenantDomain, remoteIp,
region, _timestamp, "WARNING : IP is not in the allowed range" as message
insert into SuspiciousLoginAttempt;
', null
java.lang.NullPointerException
at
org.wso2.carbon.event.processor.ui.executionPlan.flow.ExtractJsonValueImpl.setTriggerJsonValue(ExtractJsonValueImpl.java:202)
at
org.wso2.carbon.event.processor.ui.executionPlan.flow.ExtractJsonValueImpl.setJsonValues(ExtractJsonValueImpl.java:123)
at
org.wso2.carbon.event.processor.ui.executionPlan.flow.ExecutionPlanFlow.getExecutionPlanFlow(ExecutionPlanFlow.java:37)
at
org.apache.jsp.eventprocessor.execution_005fplan_005fdetails_jsp._jspService(execution_005fplan_005fdetails_jsp.java:207)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:603)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
at
org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
at
org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:905)
at
org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:688)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:682)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87)
at

Re: [Dev] BPS and REST Web Service: filter tasks by category

2018-02-07 Thread Himasha Guruge
Hi Thomas,

It seems your observations are correct as [1] is missing the field
'category'. I have reported an issue at [2] so that this can be fixed in a
future release.

[1]
https://github.com/wso2/carbon-business-process/blob/master/components/bpmn/org.wso2.carbon.bpmn.rest/src/main/java/org/wso2/carbon/bpmn/rest/model/runtime/TaskQueryRequest.java
[2] https://github.com/wso2/product-ei/issues/1840

Thanks,
Himasha

On Wed, Feb 7, 2018 at 7:15 PM, Thomas LEGRAND  wrote:

> Hello,
>
> I am currently using the BPS 3.6.0 (via EI 6.0.0) and I have a user store
> "US" in which I have two users: Toto and titi. Toto has the Internal role
> "Role A" and Titi has the Internal role "Role B".
>
> My use case is to retrieve a list of tasks in which I set the "category"
> with the value "PRIMO". One of the task has the groups "Role A" and "Role
> B" but has only the user "Toto" as candidates. Because Tito has the "Role
> B", so it should retrieve the task, too.
>
> But but but, I tried two ways to retrieve this task and they all failed:
>
> - The first one by using the Activiti Java API but I found out that I my
> "identified" user is not really identified to be in the group because when
> I check in the Activiti DB, I can't see any "Titi" in the table
> ACT_HI_IDENTITYLINK. However, I can see "Internet/Role B" but... hey, this
> is WSO2-only so I think I have to pass via the BPS WS.
>
> - The second one is to use the WSO2 BPS REST Web Service. My request in
> the http://{{bps.server}}:{{bps.port}}/bpmn/query/tasks resources using
> POST, as specified in the Activiti Documentation [1] :
>
> Request:
> {
> "candidateUser": "US/Titi",
> "category": "PRIMO"
> }
>
> Response:
> {
> "errorMessage": "Unrecognized field \"category\" (Class
> org.wso2.carbon.bpmn.rest.model.runtime.TaskQueryRequest), not marked as
> ignorable\n at [Source: org.apache.cxf.transport.http.
> AbstractHTTPDestination$1@1a0a0f94; line: 3, column: 15] (through
> reference chain: org.wso2.carbon.bpmn.rest.model.runtime.
> TaskQueryRequest[\"category\"])",
> "statusCode": 500
> }
>
> Yep. It seems that some of the query parameter specified in the Activiti
> documentation are not plugged-in to the WS implementation of WSO2.
>
> So, how can I update/fix the WSO2 web service part only without having to
> install a new version of the EI? Or am I screwed to take a scenic route
> with ugly workarounds to retrieve the tasks I want via the WS? :(
>
> Regards,
>
> Thomas
>
> [1] https://www.activiti.org/userguide/#_query_for_tasks
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Himasha Guruge
Senior Software Engineer
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error occurs on server startup IS 5.5.0 (built from Product-IS 5.5.X branch) with Postgres DB.

2018-02-07 Thread Hasanthi Purnima Dissanayake
Hi ,

Added [1] to fix this.
[1] https://github.com/wso2/carbon-identity-framework/pull/1312

Thanks,
Hasanthi

On Wed, Feb 7, 2018 at 4:19 PM, Isura Karunaratne  wrote:

> Hi all,
>
> The following error can be seen at server startup. There was another issue
> related to consent tables and it was fixed with [1]
>
>
> org.wso2.carbon.identity.base.IdentityRuntimeException:
> org.postgresql.util.PSQLException: ERROR: relation
> "idn_oidc_req_object_reference" does not exist
> at org.wso2.carbon.identity.base.IdentityRuntimeException.error
> (IdentityRuntimeException.java:71)
> at org.wso2.carbon.identity.core.persistence.IdentityDBInitiali
> zer.executeSQL(IdentityDBInitializer.java:351)
> at org.wso2.carbon.identity.core.persistence.IdentityDBInitiali
> zer.executeSQLScript(IdentityDBInitializer.java:264)
> at org.wso2.carbon.identity.core.persistence.IdentityDBInitiali
> zer.createIdentityDatabase(IdentityDBInitializer.java:141)
> at org.wso2.carbon.identity.core.persistence.JDBCPersistenceMan
> ager.initializeDatabase(JDBCPersistenceManager.java:112)
> at org.wso2.carbon.identity.core.internal.IdentityCoreServiceCo
> mponent.activate(IdentityCoreServiceComponent.java:133)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.eclipse.equinox.internal.ds.model.ServiceComponent.activ
> ate(ServiceComponent.java:235)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.a
> ctivate(ServiceComponentProp.java:146)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.b
> uild(ServiceComponentProp.java:345)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
> nt(InstanceProcess.java:620)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
> nts(InstanceProcess.java:197)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SC
> RManager.java:222)
> at org.eclipse.osgi.internal.serviceregistry.FilteredServiceLis
> tener.serviceChanged(FilteredServiceListener.java:107)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.d
> ispatchEvent(BundleContextImpl.java:861)
> at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve
> nt(EventManager.java:230)
> at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv
> entSynchronous(ListenerQueue.java:148)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu
> blishServiceEventPrivileged(ServiceRegistry.java:819)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu
> blishServiceEvent(ServiceRegistry.java:771)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistratio
> nImpl.register(ServiceRegistrationImpl.java:130)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.re
> gisterService(ServiceRegistry.java:214)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r
> egisterService(BundleContextImpl.java:433)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r
> egisterService(BundleContextImpl.java:451)
> at org.wso2.carbon.core.init.CarbonServerManager.initializeCarb
> on(CarbonServerManager.java:515)
> at org.wso2.carbon.core.init.CarbonServerManager.removePendingI
> tem(CarbonServerManager.java:291)
> at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleC
> hanged(PreAxis2ConfigItemListener.java:118)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.d
> ispatchEvent(BundleContextImpl.java:847)
> at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve
> nt(EventManager.java:230)
> at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread
> .run(EventManager.java:340)
> Caused by: org.postgresql.util.PSQLException: ERROR: relation
> "idn_oidc_req_object_reference" does not exist
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorRespons
> e(QueryExecutorImpl.java:2161)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(Quer
> yExecutorImpl.java:1890)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecut
> orImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(Abstract
> Jdbc2Statement.java:559)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
> (AbstractJdbc2Statement.java:403)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(Abstract
> Jdbc2Statement.java:395)
> at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.
> invoke(StatementFacade.java:114)
> at com.sun.proxy.$Proxy18.execute(Unknown Source)
> at 

[Dev] BPS and REST Web Service: filter tasks by category

2018-02-07 Thread Thomas LEGRAND
Hello,

I am currently using the BPS 3.6.0 (via EI 6.0.0) and I have a user store
"US" in which I have two users: Toto and titi. Toto has the Internal role
"Role A" and Titi has the Internal role "Role B".

My use case is to retrieve a list of tasks in which I set the "category"
with the value "PRIMO". One of the task has the groups "Role A" and "Role
B" but has only the user "Toto" as candidates. Because Tito has the "Role
B", so it should retrieve the task, too.

But but but, I tried two ways to retrieve this task and they all failed:

- The first one by using the Activiti Java API but I found out that I my
"identified" user is not really identified to be in the group because when
I check in the Activiti DB, I can't see any "Titi" in the table
ACT_HI_IDENTITYLINK. However, I can see "Internet/Role B" but... hey, this
is WSO2-only so I think I have to pass via the BPS WS.

- The second one is to use the WSO2 BPS REST Web Service. My request in the
http://{{bps.server}}:{{bps.port}}/bpmn/query/tasks resources using POST,
as specified in the Activiti Documentation [1] :

Request:
{
"candidateUser": "US/Titi",
"category": "PRIMO"
}

Response:
{
"errorMessage": "Unrecognized field \"category\" (Class
org.wso2.carbon.bpmn.rest.model.runtime.TaskQueryRequest), not marked as
ignorable\n at [Source:
org.apache.cxf.transport.http.AbstractHTTPDestination$1@1a0a0f94; line: 3,
column: 15] (through reference chain:
org.wso2.carbon.bpmn.rest.model.runtime.TaskQueryRequest[\"category\"])",
"statusCode": 500
}

Yep. It seems that some of the query parameter specified in the Activiti
documentation are not plugged-in to the WS implementation of WSO2.

So, how can I update/fix the WSO2 web service part only without having to
install a new version of the EI? Or am I screwed to take a scenic route
with ugly workarounds to retrieve the tasks I want via the WS? :(

Regards,

Thomas

[1] https://www.activiti.org/userguide/#_query_for_tasks
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Posting a plain text message to queue

2018-02-07 Thread Prabushi Samarakoon
Hi Dhanya,

We tested the same scenario with the developer studio. It seems media type
"text" is not supported from the developer studio code at the moment. We
have created the issue [1]
, and the relevant
fix will be added in future releases of WSO2 developer studio.

Even though "text" media type is not supported form the tooling side,
payloadFactory mediator is working for "text" media-type from WSO2 EI/ ESB
server side. As a workaround, you can manually edit the CApp to add the
media type "text", and deploy the CApp at the server. Or you can directly
create the ProxyService using the management console of the server without
using the developer studio. We support "text" media type when creating the
payload factory mediator via the management console [2]
.


​

Thanks for reporting the issue.

Best regards,
Prabushi

[1] - https://github.com/wso2/devstudio-tooling-ei/issues/120
[2] - https://docs.wso2.com/display/EI611/PayloadFactory+Mediator


On Wed, Feb 7, 2018 at 2:06 PM, dhanya  wrote:

> Hi Prabushi,
>
> I tried this. However when i give media-type as "text" there is an error in
> the studio and i am not able to proceed. Please advice.
>
> Thanks and regards
> Dhanya 
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
*Prabushi Samarakoon*
Software Engineer
Mobile: +94715434580
Email: prabus...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unnecessary debug logs in org.apache.synapse.mediators.builtin.LogMediator

2018-02-07 Thread Godwin Shrimal
Hi Senduran,

Yeah, Now I tried with WUM updated pack (not the latest), I still can see
these logs.

Thanks
Godwin

On Wed, Feb 7, 2018 at 10:23 AM, Senduran Balasubramaniyam <
sendu...@wso2.com> wrote:

> Hi Godwin,
>
>>
>>  Do you see any advantage/value by adding those logs?
>>
> Its depends on the context, say we have a large mediation and if we are
> having an issue, at such instances these logs may help to pinpoint the
> issue, specially when there are nested mediators. the "Start" and "End"
>  logs are common for all the synapse mediators and it should not be seen in
> the mediation logs. Anyway kindly let us know if you are still facing the
> issue of having these logs
>
>>
>> Thanks
>> Godwin
>>
>> On Wed, Feb 7, 2018 at 9:56 AM, Senduran Balasubramaniyam <
>> sendu...@wso2.com> wrote:
>>
>>> Hi Godwin,
>>>
>>> These are internal logs for debugging the synapse code. when there are
>>> lot of mediators this will be helpful. If you getting this log in your log
>>> mediator logs. you may need to revisit your log4j properties because when a
>>> log mediator category is set to debug you should not see this log
>>>
>>> Regards
>>> Senduran
>>>
>>> On Wed, Feb 7, 2018 at 9:51 AM, Godwin Shrimal  wrote:
>>>
 Hi Integration Team,

 Any feedback on this?

 Thanks
 Godwin

 On Fri, Jan 19, 2018 at 5:52 PM, Godwin Shrimal 
 wrote:

> Hi Devs,
>
> Shall we remove "End : Log mediator" and "End : Log mediator" debug
> logs in [1] and [2]? I don't see any value with those debug logs and it's
> annoying when we enable debug logs for 
> "org.apache.synapse.mediators.builtin.LogMediator"
> in dev environments.
>
> [1] https://github.com/wso2/wso2-synapse/blob/master/modules/cor
> e/src/main/java/org/apache/synapse/mediators/builtin/LogMedi
> ator.java#L92
> [2] https://github.com/wso2/wso2-synapse/blob/master/modules/cor
> e/src/main/java/org/apache/synapse/mediators/builtin/LogMedi
> ator.java#L124
>
> Thanks
> Godwin
>
> --
> *Godwin Amila Shrimal*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
> *
> twitter: https://twitter.com/godwinamila
> 
>



 --
 *Godwin Amila Shrimal*
 Associate Technical Lead
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: *+94772264165*
 linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
 *
 twitter: https://twitter.com/godwinamila
 

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> *Senduran *
>>> Senior Software Engineer,
>>> WSO2, Inc.;  http://wso2.com/ 
>>> Mobile: +94 77 952 6548 <+94%2077%20952%206548>
>>>
>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Associate Technical Lead
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>> *
>> twitter: https://twitter.com/godwinamila
>> 
>>
>
>
>
> --
> *Senduran *
> Senior Software Engineer,
> WSO2, Inc.;  http://wso2.com/ 
> Mobile: +94 77 952 6548 <+94%2077%20952%206548>
>



-- 
*Godwin Amila Shrimal*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
*
twitter: https://twitter.com/godwinamila

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error occurs on server startup IS 5.5.0 (built from Product-IS 5.5.X branch) with Postgres DB.

2018-02-07 Thread Isura Karunaratne
Hi all,

The following error can be seen at server startup. There was another issue
related to consent tables and it was fixed with [1]


org.wso2.carbon.identity.base.IdentityRuntimeException:
org.postgresql.util.PSQLException:
ERROR: relation "idn_oidc_req_object_reference" does not exist
at org.wso2.carbon.identity.base.IdentityRuntimeException.error(
IdentityRuntimeException.java:71)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.
executeSQL(IdentityDBInitializer.java:351)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.
executeSQLScript(IdentityDBInitializer.java:264)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.
createIdentityDatabase(IdentityDBInitializer.java:141)
at org.wso2.carbon.identity.core.persistence.JDBCPersistenceManager.
initializeDatabase(JDBCPersistenceManager.java:112)
at org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.
activate(IdentityCoreServiceComponent.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.
activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(
InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(
InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(
SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.
serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(
BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.
dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.
dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.
register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
registerService(BundleContextImpl.java:433)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
registerService(BundleContextImpl.java:451)
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(
CarbonServerManager.java:515)
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(
CarbonServerManager.java:291)
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(
PreAxis2ConfigItemListener.java:118)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(
BundleContextImpl.java:847)
at org.eclipse.osgi.framework.eventmgr.EventManager.
dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$
EventThread.run(EventManager.java:340)
Caused by: org.postgresql.util.PSQLException: ERROR: relation
"idn_oidc_req_object_reference" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
QueryExecutorImpl.java:2161)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(
QueryExecutorImpl.java:1890)
at org.postgresql.core.v3.QueryExecutorImpl.execute(
QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
AbstractJdbc2Statement.java:559)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
AbstractJdbc2Statement.java:403)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
AbstractJdbc2Statement.java:395)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(
StatementFacade.java:114)
at com.sun.proxy.$Proxy18.execute(Unknown Source)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.
executeSQL(IdentityDBInitializer.java:318)
... 31 more

[1] https://github.com/wso2/carbon-consent-management/pull/47


Thanks
Isura.
-- 

*Isura Dilhara Karunaratne*
Associate Technical Lead | WSO2
Email: 

Re: [Dev] Please review and merge PR

2018-02-07 Thread 김대경
Hi,

I,m using salesforce connector in EI-6.1.1.

I use this to query the salesforce objects using query and queryMore
functions.

The first query works, but of you do not do anything for about three hours
and then call again. EI get a connection in the connection pool and make an
http call and return a connection reset error.

In normal circumstances, the connection state changes to a stale state, and
a new connection is automatically obtained. However, in some server(in my
case Linux 2.6.32 x86_64) it is still not stale state, so a connection
reset error is detected only after an http call.

And a similar case description is described in the httpcomponents-client
document.

https://hc.apache.org/httpcomponents-client-4.3.x/tutorial/html/connmgmt.html#d5e405

Thank you,
Daekyung Kim



2018. 2. 7. 오전 4:25에 "Nishadi Kirielle" 님이 작성:

Hi Kim,

Thank you for your contribution. We are reviewing your PR.
As we are trying to reproduce the issue, can you please provide the exact
scenario where you faced this issue?

Thank you and regards,
Nishadi

On Sun, Feb 4, 2018 at 9:31 PM, 김대경  wrote:

>
> I wonder how it is progressing...
>
>
>
> 2018. 1. 26. 오후 1:31에 "김대경" 님이 작성:
>
> Can you please review and merge PR[1] .
>
> [1] https://github.com/wso2/wso2-commons-httpclient/pull/18
>
> Best Regards.
> Daekyung Kim.
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Nishadi Kirielle*
Software Engineer
WSO2, Inc.

Mobile : +94 70 204 5934
Blog : nishadikirielle.wordpress.com


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cannot find the Doc Site for siddhi-map-csv

2018-02-07 Thread Kalaiyarasi Ganeshalingam
Hi Suho,

Please find the PR [1] for this.

[1] https://github.com/wso2/product-sp/pull/470

Regards,
Kalai

Kalaiyarasi Ganeshalingam
Associate Software Engineer| WSO2
WSO2 Inc : http://wso2.org

Tel:+94 076 6792895
LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
Blogs : https://kalaiyarasig.blogspot.com/ 

On Tue, Feb 6, 2018 at 3:21 PM, Sriskandarajah Suhothayan 
wrote:

> Thanks, Mahesika and Kalaiyarasi.
>
> @Kalaiyarasi can you also add a sample to SP using CSV.
>
> Regards
> Suho
>
> On Tue, Feb 6, 2018 at 11:00 AM, Kalaiyarasi Ganeshalingam <
> kalaiyar...@wso2.com> wrote:
>
>> Thanks Maheshika, Now It's working.
>>
>> Kalaiyarasi Ganeshalingam
>> Associate Software Engineer| WSO2
>> WSO2 Inc : http://wso2.org
>> 
>> Tel:+94 076 6792895 <076%20679%202895>
>> LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
>> Blogs : https://kalaiyarasig.blogspot.com/ 
>>
>> On Tue, Feb 6, 2018 at 8:44 AM, Maheshika Goonetilleke <
>> mahesh...@wso2.com> wrote:
>>
>>> Hi Suho
>>>
>>> My mistake, I have pointed to /docs. Amended it to point to gh-pages.
>>> Please check now.
>>>
>>> On Tue, Feb 6, 2018 at 12:38 AM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote:
>>>
 @Maheshika Can you cross check if the siddhi-map-csv[1] is properly
 enabled with gh-pages site?

 [1] https://github.com/wso2-extensions/siddhi-map-csv/

 On Sat, Feb 3, 2018 at 8:53 PM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

> I still don’t see the site being fixed !
>
> This is sloppy!  Please fix ASAP
>
> On Tue, Jan 30, 2018 at 5:35 PM Kalaiyarasi Ganeshalingam <
> kalaiyar...@wso2.com> wrote:
>
>> Hi all,
>>
>> Please find the PR [1][2] for this.
>>
>> [1] https://github.com/wso2-extensions/siddhi-map-csv/pull/5
>> [2] https://github.com/wso2-extensions/siddhi-map-csv/pull/4
>>
>> Regards,
>>
>> Kalaiyarasi Ganeshalingam
>> Associate Software Engineer| WSO2
>> WSO2 Inc : http://wso2.org
>> 
>> Tel:+94 076 6792895 <076%20679%202895>
>> LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
>> Blogs : https://kalaiyarasig.blogspot.com/
>> 
>>
>> On Mon, Jan 29, 2018 at 11:01 PM, Sriskandarajah Suhothayan <
>> s...@wso2.com> wrote:
>>
>>> Why this does not use Siddhi theme like other extensions?
>>>
>>> On Thu, Jan 25, 2018 at 11:09 AM Kalaiyarasi Ganeshalingam <
>>> kalaiyar...@wso2.com> wrote:
>>>

 Thanks Maheshika. I will check.

 Kalaiyarasi Ganeshalingam
 Associate Software Engineer| WSO2
 WSO2 Inc : http://wso2.org
 
 Tel:+94 076 6792895 <+94%2076%20679%202895>
 LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
 Blogs : https://kalaiyarasig.blogspot.com/
 

 On Wed, Jan 24, 2018 at 11:05 PM, Maheshika Goonetilleke <
 mahesh...@wso2.com> wrote:

> Hi Kalaiyarasi
>
> I add the /docs to gh-pages. Please check.
>
> On Wed, Jan 24, 2018 at 9:26 PM, Kalaiyarasi Ganeshalingam <
> kalaiyar...@wso2.com> wrote:
>
>> + Maheshika.
>>
>> Kalaiyarasi Ganeshalingam
>> Associate Software Engineer| WSO2
>> WSO2 Inc : http://wso2.org
>> 
>> Tel:+94 076 6792895 <+94%2076%20679%202895>
>> LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
>> Blogs : https://kalaiyarasig.blogspot.com/
>> 
>>
>> On Wed, Jan 24, 2018 at 9:06 PM, Kalaiyarasi Ganeshalingam <
>> kalaiyar...@wso2.com> wrote:
>>
>>> Hi Mahesika,
>>>
>>> Can you generate the gh-page branch for the repo[1].
>>>
>>> [1] https://github.com/wso2-extensions/siddhi-map-csv
>>>
>>> Regards,
>>> Kalai
>>>
>>> Kalaiyarasi Ganeshalingam
>>> Associate Software Engineer| WSO2
>>> WSO2 Inc : http://wso2.org
>>> 
>>> Tel:+94 076 6792895 <+94%2076%20679%202895>
>>> LinkedIn :www.linkedin.com/in/kalaiyarasiganeshalingam
>>> Blogs : https://kalaiyarasig.blogspot.com/
>>> 
>>>

Re: [Dev] Posting a plain text message to queue

2018-02-07 Thread dhanya
Hi Prabushi,

I tried this. However when i give media-type as "text" there is an error in
the studio and i am not able to proceed. Please advice.

Thanks and regards
Dhanya  



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Posting a plain text message to queue

2018-02-07 Thread Prabushi Samarakoon
Hi Dhanya,

You can use the XPath expression for the relevant text entry to extract the
text value. For example, expression "//node/text()" can be used to get the
required text as follows.

 
$1

   

 

 Input:
 Sample Response

[1] - https://docs.wso2.com/display/ESB500/Synapse+XPath+Variables

Thanks,
Prabushi

On Wed, Feb 7, 2018 at 11:07 AM, dhanya  wrote:

> Hi,
>
> Anyone has information on how this can be done?
>
> Thanks and regards
> Dhanya
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
*Prabushi Samarakoon*
Software Engineer
Mobile: +94715434580
Email: prabus...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev