Re: [Dev] API Requirements for EMM Dashboard

2016-04-21 Thread Dilan Udara Ariyaratne
Hi Ramindu,

I have just exposed two jax-rs apis for the following gadgets of the
landing dashboard page as discussed in the last UX/UI meeting held on April
11th.
[1] Device-overview-gadget (GET https://localhost:9443/mdm-admin/dashboard/
device-overview) :
 To show device counts as TOTAL, ACTIVE, INACTIVE and REMOVED
[2] Potential-vlunerabilities (GET https://localhost:9443/mdm-admin/
dashboard/potential-vulnerabilities) :
 To show device counts as NON-COMPLIANT, UNMONITORED (NO-PASSCODE and
NO-ENCRYPTION data capturing in still under development)

Would you be able to get a build of product-emm and try these APIs from the
portal app?

I would be able to provide all the first-cut APIs for the landing dashboard
page by this evening.

Cheers,
Dilan.


*Dilan U. Ariyaratne*
Software Engineer
WSO2 Inc. 
Mobile: +94766405580 <%2B94766405580>
lean . enterprise . middleware


On Wed, Apr 20, 2016 at 12:07 PM, Ramindu De Silva 
wrote:

> Hi all,
>
> The following are the request-response structures for the IoT dashboard
> API. Please mention any suggestion or changes to the following
>
>
> 1. Retrieve connectivity status.
>
>>
>> *Request: *POST /connectivityStatus
>
> *{}*
>
> *response:* [
>>
> {
>
> "context": "deviceInfo",
>
> "data": [
>
> {
>
> "group": "active",
>
> "label": "active",
>
> "count": activeNo
>
> },
>
> {
>
> "group": "all",
>
> "label": "all",
>
> "count": activeNo + inactiveNo
>
> },
>
> {
>
> "group": "inactive",
>
> "label": "inactive",
>
> "count": inactiveNo
>
> }
>
> ]
>
> }
>
> ]
>
> 2. Retrieve vulnerabilities
>
>
>> *Request: *POST /securityConcerns
>> *{*
>> *}**response:* [
>>
> {
>
> "context": "securityConcerns",
>
> "data": [
>
> {
>
> "group": "no-passcode",
>
> "label": "No Passcode",
>
> "countChange": randint(100, 500),
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "no-encryption",
>
> "label": "Non encrypted",
>
> "countChange": randint(100, 500),
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "unmonitored",
>
> "label": "Unmonitored",
>
> "countChange": randint(100, 500),
>
> "count": randint(100, 500)
>
> }
>
> ]
>
> }
>
> ]
>
>
> 3. Retrieve non compliant features
>
>
>> *Request: *POST /nonCompliantDevices
>> *{*
>
> fromIndex: 10,
>
> count: 5
>
> *}*
>
> *response:*[
>
>  {
>
> "context": "nonCompliantDevices",
>
> "data":[
>
> {
>
> "group": "non-compliant-1",
>
> "label": "Non Compliant-1",
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "non-compliant-2",
>
> "label": "non-compliant-2",
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "non-compliant-3",
>
> "label": "non-compliant-3",
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "non-compliant-4",
>
> "label": "non-compliant-4",
>
> "count": randint(100, 500)
>
> },
>
> {
>
> "group": "non-compliant-5",
>
> "label": "non-compliant-5",
>
> "count": randint(100, 500)
>
> }
>
> ]
>
> }
>
> ]
>
>
> 4. Retrieve grouping: This has two types of requests request 1 without
> mentioning any filters and request 2 with a filter
>
>
>> *Request1: *POST /nonCompliantDevices
>> *[]*
>
> *response1:*[
>> {
>> "context": "platforms",
>> "data": [
>> {
>> "group": "ios",
>> "label": "iOS",
>> "count": randint(100, 500)
>> },
>> {
>> "group": "android",
>> "label": "Android",
>> "count": randint(100, 500)
>> }
>> ]
>> },
>> {
>> "context": "ownerships",
>> "data": [
>> {
>> "group": "cope",
>> "label": "COPE",
>> "count": randint(100, 500)
>> },
>> {
>> "group": "byod",
>> "label": "BYOD",
>> "count": randint(100, 500)
>> }
>> ]
>> },
>> {
>> "context": "userGroups",
>> "data": [
>> {
>> "group": "sales",
>> "label": "Sales",
>> "count": randint(100, 500)
>> },
>> {
>> "group": "marketing",
>> "label": "Marketing",
>> "count": randint(100, 500)
>> },
>> {
>> "group": "engineering",
>> "label": "Engineering",
>> "count": randint(100, 500)
>> }
>> ]
>> }
>
> ]
>
>
>
>> *Request2: *POST /nonCompliantDevices
>> {
>> "filters": [
>>{
>> "filteringContext": "platform",
>> "filteringGroups" : ["Android"]
>>}
>
> ]
>
> }
>>
> *response2:*[
>> {
>> "context": "platforms",
>> "data": [
>> {
>> "group": "ios",
>> "label": "iOS",
>> "count": randint(100, 500)
>> },
>> {
>> "group": "android",
>>  

Re: [Dev] [DEV][Kubernetes Artifacts] Add /etc/hosts entry using the deploy script

2016-04-21 Thread Chamila De Alwis
The above command should change to the following. We are checking the HTTP
port for activity.

cat ${PWD##*/}-default-service.yaml | grep servlet-http -A 4 -w | grep
nodePort | awk '{print $2}'


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Apr 22, 2016 at 11:02 AM, Chamila De Alwis 
wrote:

> Furthermore, instead of hardcoding the default port value in the deploy.sh
> script, we can find that out from the
> [product-name]-default-service.yaml file, using the following bash command.
> This way, if the user changes the NodePorts for the product, they are not
> required to repeat it in the script. It's easy to miss this change and get
> frustrated when the deploy script doesn't work.
>
> Con: there shouldn't be any major YAML changes, otherwise the grep -A
> command might fail.
>
> cat ${PWD##*/}-default-service.yaml | grep servlet-https -A 4 | grep
> nodePort | awk '{print $2}'
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Fri, Apr 22, 2016 at 10:31 AM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com> wrote:
>
>>
>>
>> On Fri, Apr 22, 2016 at 10:09 AM, Chamila De Alwis 
>> wrote:
>>
>>> Hi,
>>>
>>> Just noticed that, in the README [1],  we instruct the user to add a
>>> host mapping manually to access the management console after deploying the
>>> Service. We can do this in the deploy script itself, and cleanup in the
>>> undeploy script. WDYT?
>>>
>>
>> +1, It'll easy the process.
>>
>>>
>>> [1] -
>>> https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/README.md
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Committer and PMC Member - Apache Stratos
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][Kubernetes Artifacts] Add /etc/hosts entry using the deploy script

2016-04-21 Thread Chamila De Alwis
Furthermore, instead of hardcoding the default port value in the deploy.sh
script, we can find that out from the
[product-name]-default-service.yaml file, using the following bash command.
This way, if the user changes the NodePorts for the product, they are not
required to repeat it in the script. It's easy to miss this change and get
frustrated when the deploy script doesn't work.

Con: there shouldn't be any major YAML changes, otherwise the grep -A
command might fail.

cat ${PWD##*/}-default-service.yaml | grep servlet-https -A 4 | grep
nodePort | awk '{print $2}'


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Apr 22, 2016 at 10:31 AM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

>
>
> On Fri, Apr 22, 2016 at 10:09 AM, Chamila De Alwis 
> wrote:
>
>> Hi,
>>
>> Just noticed that, in the README [1],  we instruct the user to add a host
>> mapping manually to access the management console after deploying the
>> Service. We can do this in the deploy script itself, and cleanup in the
>> undeploy script. WDYT?
>>
>
> +1, It'll easy the process.
>
>>
>> [1] -
>> https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/README.md
>>
>> Regards,
>> Chamila de Alwis
>> Committer and PMC Member - Apache Stratos
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Process Center] Permission API in Registry

2016-04-21 Thread Yasima Dewmini
Hi Manuranga,

I need to get the permission levels of the assets types.

Regards,
Yasima.

On Thu, Apr 21, 2016 at 9:14 PM, Manuranga Perera  wrote:

> Hi Yasima,
> Are you trying to retrieve permission of the dashboard or some other
> resource (profile pic, video)?
>
> On Wed, Apr 20, 2016 at 4:57 AM, Mushthaq Rumy  wrote:
>
>> Hi,
>>
>>
>> There is a class called PermissionUtil in org.wso2.carbon.registry.
>> resource.services.utils package in the Registry. You can use the
>> getPermissions method in the above class to get the permission level.
>>
>> Thanks & Regards,
>>
>> On Wed, Apr 20, 2016 at 1:44 PM, Yasima Dewmini  wrote:
>>
>>> Hi,
>>>
>>> I'm from PC team and I'm implementing process level permission support
>>> for PC. I need to get the permission level given resource, action and the
>>> user.
>>> Can I know the permission API used for this in Registry?
>>>
>>>
>>> Thanks and Regards,
>>> Yasima.
>>>
>>> --
>>> Yasima Dewmini
>>> Software Engineer, WSO2, Inc.
>>> Mobile: 0713117081
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Mushthaq Rumy
>> *Software Engineer*
>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>> Email : musht...@wso2.com
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middleware.
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
Yasima Dewmini
Software Engineer, WSO2, Inc.
Mobile: 0713117081
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Create user using SCIM

2016-04-21 Thread Milan Perera
Thanks kasun

On Fri, Apr 22, 2016 at 10:29 AM, Kasun Bandara  wrote:

> Hi Milan,
>
> If you are planning to use the $subject in a separate carbon product, you
> need to install this as a feature from [1] and use the corresponding
> functionalities.
>
> Thanks,
> Kasun.
>
>
> [1] http://product-dist.wso2.com/p2/carbon/releases/wilkes/
>
> On Fri, Apr 22, 2016 at 10:17 AM, Milan Perera  wrote:
>
>> Hi all,
>>
>> Is the $subject only available in IS [1]?
>>
>> [1]
>> https://docs.wso2.com/display/IS510/Configuring+Users#ConfiguringUsers-CreateuserusingSCIM
>>
>> Thanks,
>>
>> --
>> *Milan Perera *| Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 77 309 7088 | Work: +94 11 214 5345
>> Email: mi...@wso2.com  | Web: www.wso2.com
>> 
>>
>
>
>
> --
> Kasun Bandara
> *Software Engineer*
> Mobile : +94 (0) 718 338 360
> <%2B94%20%280%29%20773%20451194>
> kas...@wso2.com 
>



-- 
*Milan Perera *| Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 77 309 7088 | Work: +94 11 214 5345
Email: mi...@wso2.com  | Web: www.wso2.com

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


Re: [Dev] [DEV][Kubernetes Artifacts] Add /etc/hosts entry using the deploy script

2016-04-21 Thread Thanuja Uruththirakodeeswaran
On Fri, Apr 22, 2016 at 10:09 AM, Chamila De Alwis 
wrote:

> Hi,
>
> Just noticed that, in the README [1],  we instruct the user to add a host
> mapping manually to access the management console after deploying the
> Service. We can do this in the deploy script itself, and cleanup in the
> undeploy script. WDYT?
>

+1, It'll easy the process.

>
> [1] -
> https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/README.md
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


Re: [Dev] Create user using SCIM

2016-04-21 Thread Kasun Bandara
Hi Milan,

If you are planning to use the $subject in a separate carbon product, you
need to install this as a feature from [1] and use the corresponding
functionalities.

Thanks,
Kasun.


[1] http://product-dist.wso2.com/p2/carbon/releases/wilkes/

On Fri, Apr 22, 2016 at 10:17 AM, Milan Perera  wrote:

> Hi all,
>
> Is the $subject only available in IS [1]?
>
> [1]
> https://docs.wso2.com/display/IS510/Configuring+Users#ConfiguringUsers-CreateuserusingSCIM
>
> Thanks,
>
> --
> *Milan Perera *| Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 77 309 7088 | Work: +94 11 214 5345
> Email: mi...@wso2.com  | Web: www.wso2.com
> 
>



-- 
Kasun Bandara
*Software Engineer*
Mobile : +94 (0) 718 338 360
<%2B94%20%280%29%20773%20451194>
kas...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Create user using SCIM

2016-04-21 Thread Milan Perera
Hi all,

Is the $subject only available in IS [1]?

[1]
https://docs.wso2.com/display/IS510/Configuring+Users#ConfiguringUsers-CreateuserusingSCIM

Thanks,

-- 
*Milan Perera *| Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 77 309 7088 | Work: +94 11 214 5345
Email: mi...@wso2.com  | Web: www.wso2.com

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


[Dev] [DEV][Kubernetes Artifacts] Add /etc/hosts entry using the deploy script

2016-04-21 Thread Chamila De Alwis
Hi,

Just noticed that, in the README [1],  we instruct the user to add a host
mapping manually to access the management console after deploying the
Service. We can do this in the deploy script itself, and cleanup in the
undeploy script. WDYT?

[1] -
https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/README.md

Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Analytics] Removing FACET from Indexing data types

2016-04-21 Thread Gimantha Bandara
Hi Isuru,

Older FACET keyword is also supported. Yes, we are planing to add -f to
denote facet attribute.

@Anjana/Niranda WDYT?

On Friday, April 22, 2016, Isuru Wijesinghe  wrote:

> Hi Gimantha,
>
> How can we denote a given field in any data type as a facet in
> *spark-sql.* Lets say as an example I have a field called
> processDefinitionId (string data-type) and I need to define it as a facet
> as well (see below example).
>
> CREATE TEMPORARY TABLE PROCESS_USAGE_SUMMARY USING CarbonAnalytics OPTIONS
> (tableName "PROCESS_USAGE_SUMMARY_DATA",
> schema "processDefinitionId string -i *-f*,
> processVersion string -i,
> processInstanceId string -i,,
> primaryKeys "processInstanceId"
> );
>
> is this the way that we can define it in newer version ?
>
>
> On Fri, Apr 22, 2016 at 2:39 AM, Gimantha Bandara  > wrote:
>
>> Hi all,
>>
>> We are planning to remove "FACET" (this type is used to categorize/group,
>> to get unique values and to drill-down) from indexing data types and we
>> will introduce an attribute to mark other data types as a FACET or not.
>> Earlier FACETs can be defined only for STRING fields and even if we define
>> a STRING as a FACET, then we will not be able to search it as a STRING
>> field. With this change, any data type field can be marked as a FACET and
>> then the field can be used as a FACET and as the usual data type as well.
>> This change will not affect the older DAS capps or event-store
>> configurations; It will be backward compatible with previous DAS versions
>> (3.0.0 and 3.0.1). However if you try to get the Schema of a table using JS
>> APIs, REST APIs or the Webservice, FACET type will not be there. A
>> attribute called "isFacet" is used to identify the FACETed fields. See
>> below for an example.
>>
>>
>>
>> *Older schema*
>> {
>> "columns" : {
>>"logFile" : { "type" : "STRING", "isIndex" : true,
>> "isScoreParam" : false },
>>"level" : { "type" : "DOUBLE", "isIndex" : true,
>> "isScoreParam" : false },
>>"location" : { "type" : "FACET", "isIndex" : true,
>> "isScoreParam" : false } },
>> "primaryKeys" : ["logFile", "level"]
>> }
>>
>>
>> *Equivalent new schema*
>>
>>
>> *{ "columns" : {   "logFile" : { "type" : "STRING", "isIndex"
>> : true, "isScoreParam" : false, **, isFacet : *false
>> * },   "*level*" : { "type" : "DOUBLE", "isIndex" : true,
>> "isScoreParam" : false, **, isFacet : *false* },*
>> *   "location" : { "type" : "*STRING*", "isIndex" : true,
>> "isScoreParam" : false, isF*acet : true
>> * } },//FACET field is removed "primaryKeys" : ["logFile", "*
>> level
>>
>>
>> *"] }*
>> --
>>
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> 
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Isuru Wijesinghe
> *Software Engineer*
> WSO2 inc : http://wso2.com
> lean.enterprise.middleware
> Mobile: 0710933706
> isur...@wso2.com 
>


-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [Analytics] Removing FACET from Indexing data types

2016-04-21 Thread Isuru Wijesinghe
Hi Gimantha,

How can we denote a given field in any data type as a facet in *spark-sql.*
Lets say as an example I have a field called processDefinitionId (string
data-type) and I need to define it as a facet as well (see below example).

CREATE TEMPORARY TABLE PROCESS_USAGE_SUMMARY USING CarbonAnalytics OPTIONS
(tableName "PROCESS_USAGE_SUMMARY_DATA",
schema "processDefinitionId string -i *-f*,
processVersion string -i,
processInstanceId string -i,,
primaryKeys "processInstanceId"
);

is this the way that we can define it in newer version ?


On Fri, Apr 22, 2016 at 2:39 AM, Gimantha Bandara  wrote:

> Hi all,
>
> We are planning to remove "FACET" (this type is used to categorize/group,
> to get unique values and to drill-down) from indexing data types and we
> will introduce an attribute to mark other data types as a FACET or not.
> Earlier FACETs can be defined only for STRING fields and even if we define
> a STRING as a FACET, then we will not be able to search it as a STRING
> field. With this change, any data type field can be marked as a FACET and
> then the field can be used as a FACET and as the usual data type as well.
> This change will not affect the older DAS capps or event-store
> configurations; It will be backward compatible with previous DAS versions
> (3.0.0 and 3.0.1). However if you try to get the Schema of a table using JS
> APIs, REST APIs or the Webservice, FACET type will not be there. A
> attribute called "isFacet" is used to identify the FACETed fields. See
> below for an example.
>
>
>
> *Older schema*
> {
> "columns" : {
>"logFile" : { "type" : "STRING", "isIndex" : true,
> "isScoreParam" : false },
>"level" : { "type" : "DOUBLE", "isIndex" : true, "isScoreParam"
> : false },
>"location" : { "type" : "FACET", "isIndex" : true,
> "isScoreParam" : false } },
> "primaryKeys" : ["logFile", "level"]
> }
>
>
> *Equivalent new schema*
>
>
> *{ "columns" : {   "logFile" : { "type" : "STRING", "isIndex"
> : true, "isScoreParam" : false, **, isFacet : *false
> * },   "*level*" : { "type" : "DOUBLE", "isIndex" : true,
> "isScoreParam" : false, **, isFacet : *false* },*
> *   "location" : { "type" : "*STRING*", "isIndex" : true,
> "isScoreParam" : false, isF*acet : true
> * } },//FACET field is removed "primaryKeys" : ["logFile", "*level
>
>
> *"] }*
> --
>
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Isuru Wijesinghe
*Software Engineer*
WSO2 inc : http://wso2.com
lean.enterprise.middleware
Mobile: 0710933706
isur...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] API/Proxy to consult LDAP through ESB

2016-04-21 Thread Chanaka Fernando
Hi William,

You don't need do such hard things.

1. Create a REST API in WSO2 ESB to accept the request payload with your
preferred path. You can refer [1] for REST support in ESB.

2. Use the LDAP connector available in WSO2 connector store at [2] to
communicate with your LDAP.

That's all you need to do. No custom code, No WSO2 AS involvement.

[1]
http://wso2.com/library/articles/2013/12/restful-integration-with-wso2-esb/

[2]
https://store.wso2.com/store/assets/esbconnector/6e86496f-431e-43e2-bded-caedd10c4cb9

Cheers,
Chanaka

On Fri, Apr 22, 2016 at 5:14 AM, Willian Antunes <
willian.lima.antu...@gmail.com> wrote:

> Hello everyone,
>
> I'm used to work with Apache Camel and I'm new with WSO2 solutions. I have
> the following requirement:
>
> *- Create a rest web service which receives an username and password.*
> *- Use the parameters to authenticate in a LDAP directory and return some
> of the user properties.*
>
> For Apache Camel I would use LDAP and CXF components in order to implement
> it. Would be quiet easy.
>
> But how can I do with WSO2? According to my research:
>
> *1 - Use WSO2 AS to implement a JAX-RS which has the logic to communicate
> with a LDAP directory (develop a pure Java code instead of a component
> bundled).*
> *2 - Create a Proxy (like Camel) or BPEL which will use the JAX-RS
> previously created to deliver (or not) the LDAP user properties.*
>
> Am I right? Is there another way to do it?
>
> Thank you.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB] API/Proxy to consult LDAP through ESB

2016-04-21 Thread Willian Antunes
Hello everyone,

I'm used to work with Apache Camel and I'm new with WSO2 solutions. I have
the following requirement:

*- Create a rest web service which receives an username and password.*
*- Use the parameters to authenticate in a LDAP directory and return some
of the user properties.*

For Apache Camel I would use LDAP and CXF components in order to implement
it. Would be quiet easy.

But how can I do with WSO2? According to my research:

*1 - Use WSO2 AS to implement a JAX-RS which has the logic to communicate
with a LDAP directory (develop a pure Java code instead of a component
bundled).*
*2 - Create a Proxy (like Camel) or BPEL which will use the JAX-RS
previously created to deliver (or not) the LDAP user properties.*

Am I right? Is there another way to do it?

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


Re: [Dev] How do we handle acr_values in the OIDC authentication request..?

2016-04-21 Thread Prabath Siriwardana
I doubt we can expect an extension to handle this... How did we implement
this in Mobile Connect..? It's a mandatory parameter for Mobile Connect...

Thanks & regards,
-Prabath

On Thu, Apr 21, 2016 at 3:47 PM, Johann Nallathamby  wrote:

> Currently we don't perform any action on the acr_values by default. Its
> read and passed on to the grant handlers and other parts of the component
> to be handled by suitable extension points.
>
> On Fri, Apr 22, 2016 at 4:05 AM, Prabath Siriwardana 
> wrote:
>
>> $subject
>>
>> --
>> Thanks & Regards,
>> Prabath
>>
>> Twitter : @prabath
>> LinkedIn : http://www.linkedin.com/in/prabathsiriwardena
>>
>> Mobile : +1 650 625 7950
>>
>> http://blog.facilelogin.com
>> http://blog.api-security.org
>>
>
>
>
> --
> Thanks & Regards,
>
> *Johann Dilantha Nallathamby*
> Technical Lead & Product Lead of WSO2 Identity Server
> Governance Technologies Team
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+9476950*
> Blog - *http://nallaa.wordpress.com *
>



-- 
Thanks & Regards,
Prabath

Twitter : @prabath
LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

Mobile : +1 650 625 7950

http://blog.facilelogin.com
http://blog.api-security.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How do we handle acr_values in the OIDC authentication request..?

2016-04-21 Thread Johann Nallathamby
Currently we don't perform any action on the acr_values by default. Its
read and passed on to the grant handlers and other parts of the component
to be handled by suitable extension points.

On Fri, Apr 22, 2016 at 4:05 AM, Prabath Siriwardana 
wrote:

> $subject
>
> --
> Thanks & Regards,
> Prabath
>
> Twitter : @prabath
> LinkedIn : http://www.linkedin.com/in/prabathsiriwardena
>
> Mobile : +1 650 625 7950
>
> http://blog.facilelogin.com
> http://blog.api-security.org
>



-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Technical Lead & Product Lead of WSO2 Identity Server
Governance Technologies Team
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+9476950*
Blog - *http://nallaa.wordpress.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How do we handle acr_values in the OIDC authentication request..?

2016-04-21 Thread Prabath Siriwardana
$subject

-- 
Thanks & Regards,
Prabath

Twitter : @prabath
LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

Mobile : +1 650 625 7950

http://blog.facilelogin.com
http://blog.api-security.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Analytics] Removing FACET from Indexing data types

2016-04-21 Thread Gimantha Bandara
Hi all,

We are planning to remove "FACET" (this type is used to categorize/group,
to get unique values and to drill-down) from indexing data types and we
will introduce an attribute to mark other data types as a FACET or not.
Earlier FACETs can be defined only for STRING fields and even if we define
a STRING as a FACET, then we will not be able to search it as a STRING
field. With this change, any data type field can be marked as a FACET and
then the field can be used as a FACET and as the usual data type as well.
This change will not affect the older DAS capps or event-store
configurations; It will be backward compatible with previous DAS versions
(3.0.0 and 3.0.1). However if you try to get the Schema of a table using JS
APIs, REST APIs or the Webservice, FACET type will not be there. A
attribute called "isFacet" is used to identify the FACETed fields. See
below for an example.



*Older schema*
{
"columns" : {
   "logFile" : { "type" : "STRING", "isIndex" : true,
"isScoreParam" : false },
   "level" : { "type" : "DOUBLE", "isIndex" : true, "isScoreParam"
: false },
   "location" : { "type" : "FACET", "isIndex" : true,
"isScoreParam" : false } },
"primaryKeys" : ["logFile", "level"]
}


*Equivalent new schema*


*{ "columns" : {   "logFile" : { "type" : "STRING", "isIndex" :
true, "isScoreParam" : false, **, isFacet : *false
* },   "*level*" : { "type" : "DOUBLE", "isIndex" : true,
"isScoreParam" : false, **, isFacet : *false* },*
*   "location" : { "type" : "*STRING*", "isIndex" : true,
"isScoreParam" : false, isF*acet : true
* } },//FACET field is removed "primaryKeys" : ["logFile", "*level


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


Re: [Dev] [appcloud] Unable to connect to Docker Client from local set up

2016-04-21 Thread Kasun De Silva
Hi Sabra,

Seems like you haven't added the certificates and hosts to connect to the
appcloud internal docker registry. You need to run [1].

1. First open /etc/hosts in your local

2. Add following host entry

192.168.16.2 registry.docker.appfactory.private.wso2.com

3. Then run the script in [1].

It will ask for docker registry host and port. Give following values.

Host : registry.docker.appfactory.private.wso2.com
Port : 5000

(Check these values are correct with the team)

This should work.

[1]
https://github.com/wso2/app-cloud/blob/master/modules/setup-scripts/tools/docker_setup.sh

Thanks,
Kasun

On Thu, Apr 21, 2016 at 7:01 AM, Punnadi Gunarathna 
wrote:

> Hi Sabra,
>
> Did you run dockerImages.sh file?
>
> On Thu, Apr 21, 2016 at 5:26 PM, Sabra Ossen  wrote:
>
>> Hi All,
>>
>> I have created a local setup and I am trying to create an app in app
>> cloud. I get the following stack trace.
>>
>> INFO {module/application/application.jag} -  Application Launch URL:
>> carbon-super-bwsam-1-0-0.apps.cloud.wso2.com
>> {module/application/application.jag}
>> TID: [0] [AS] [2016-04-21 17:04:10,331] ERROR
>> {org.wso2.appcloud.core.docker.DockerOpClient} -  Build Failure:Failed to
>> connect to /192.168.18.2:2375
>> {org.wso2.appcloud.core.docker.DockerOpClient}
>> TID: [0] [AS] [2016-04-21 17:04:10,332] ERROR
>> {org.wso2.appcloud.core.docker.DockerOpClient} -  Docker image building
>> failed: msf4j repo: registry.182.docker.appfactory.private.wso2.com:5000
>> docker file:
>> /home/sabra/WSO2/AppCloud/Local//setup/wso2as-5.2.1//repository/deployment/server/jaggeryapps/appmgt//tmpUploadedApps/carbon.super/3219047332775631666/
>> tag: 1.0-3219047332775631666 {org.wso2.appcloud.core.docker.DockerOpClient}
>> TID: [0] [AS] [2016-04-21 17:04:10,338]  INFO
>> {module/application/application.jag} -  Retrying docker build retry counter
>> value : 0 {module/application/application.jag}
>> TID: [0] [AS] [2016-04-21 17:06:19,226] ERROR
>> {org.wso2.appcloud.core.docker.DockerOpClient} -  Build Failure:Failed to
>> connect to /192.168.18.2:2375
>> {org.wso2.appcloud.core.docker.DockerOpClient}
>> TID: [0] [AS] [2016-04-21 17:06:19,355] ERROR
>> {org.wso2.appcloud.core.docker.DockerOpClient} -  Push Failure:Failed to
>> connect to /192.168.18.2:2375
>> {org.wso2.appcloud.core.docker.DockerOpClient}
>> TID: [0] [AS] [2016-04-21 17:06:19,355] ERROR
>> {org.wso2.appcloud.core.docker.DockerOpClient} -  Docker image push failed:
>> msf4j repo: registry.182.docker.appfactory.private.wso2.com:5000 tag:
>> 1.0-3219047332775631666 {org.wso2.appcloud.core.docker.DockerOpClient}
>> TID: [0] [AS] [2016-04-21 17:06:19,381] ERROR
>> {module/application/application.jag} -  Error uploading docker image to
>> remote registry {module/application/application.jag}
>> TID: [0] [AS] [2016-04-21 17:06:19,381] ERROR
>> {module/application/application.jag} -
>>  org.mozilla.javascript.WrappedException: Wrapped
>> org.wso2.appcloud.common.AppCloudException: Docker image push failed: msf4j
>> repo: registry.182.docker.appfactory.private.wso2.com:5000 tag:
>> 1.0-3219047332775631666 (/appmgt/modules/application/application.jag#100)
>> at
>> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
>> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
>> at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
>> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c1._c_anonymous_3(/appmgt/modules/application/application.jag:100)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c1.call(/appmgt/modules/application/application.jag)
>> at
>> org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c1._c_anonymous_1(/appmgt/modules/application/application.jag:78)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c1.call(/appmgt/modules/application/application.jag)
>> at
>> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
>> at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
>> at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
>> at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c0._c_anonymous_1(/appmgt/modules/application/module.jag:22)
>> at
>> org.jaggeryjs.rhino.appmgt.modules.application.c0.call(/appmgt/modules/application/module.jag)
>> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
>> at
>> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1._c_anonymous_1(/appmgt/site/blocks/application/application.jag:83)
>> at
>> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1.call(/appmgt/site/blocks/application/application.jag)
>> at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
>> at
>> 

Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Amal Gunatilake
Hi Manuranga,

Is it possible to get a notification from the system to BPS side when the
user goes on vacation? If so we can have an onMessage boundary event
listener to trigger the BPMN process to reassign the task.

Best regards,
Amal.

On Fri, Apr 22, 2016 at 12:12 AM, Manuranga Perera  wrote:

> Hi Amal,
>
>
>> When the main user fails to complete the task within the deadline, the
>> timer boundary event will trigger the Java service task. Then within the
>> Java service task, we can dynamically assign the task to next user by
>> reading the list of candidate users saved inside the process variable.
>
>
> The requirement is not to do it by time, (as the user store in the first
> mail) tasks has to be made claimable to the other user at the time task
> starts, if the user is on vacation. So we have to listen to some task start
> event.
>
>
> On Thu, Apr 21, 2016 at 11:06 AM, Amal Gunatilake  wrote:
>
>> Yes, according to the updates we cannot use the candidateGroups attribute
>> because it results in showing the task to every other user in the role.
>> (And not possible when users are in different roles)
>>
>> Therefore, as an alternative, we can have the main user put in assignee
>> attribute and rest of the candidate users in a variable within the process
>> stored as a list. This will prevent the task visibility to other candidate
>> users.
>>
>> When the main user fails to complete the task within the deadline, the
>> timer boundary event will trigger the Java service task. Then within the
>> Java service task, we can dynamically assign the task to next user by
>> reading the list of candidate users saved inside the process variable.
>>
>> Best regards,
>> Amal.
>>
>> On Thu, Apr 21, 2016 at 8:22 PM, Manuranga Perera  wrote:
>>
>>> BTW, I have found a bit old discussion [1] on activity site. I am
>>> looking to that options as well.
>>>
>>> [1] https://forums.activiti.org/content/dynamic-assignment
>>>
>>> On Thu, Apr 21, 2016 at 10:49 AM, Manuranga Perera 
>>> wrote:
>>>
 Hi Amal,
 Thanks for the suggestion.

 I have also considered that option. But I thought it had the following
 limitations:
   * When users are in different roles. Eg: "product lead" should take
 over when "team lead" is on vacation. But by default  "team lead" shouldn't
 see all the tasks for "product lead"
   * Works when we want to specify 'candidateGroups' , but not when we
 need to specify 'assignee'

 May be these limitations are fine for the current use-case. I am also
 still gathering requirements. I'll keep this as the preferred option. Just
 wanted to see what are the other options.

 On Thu, Apr 21, 2016 at 10:29 AM, Amal Gunatilake 
 wrote:

> Hi Manuranga,
>
> What you have suggested is also possible. On the other hand, I have
> another suggestion.
>
> When we assign user1 and user2 to the same role and then we define
> only candidateGroups attribute to user task element, the tasks become
> available to both users and who ever available can claim them and 
> continue.
> Also, we can have a timer boundary event to define a deadline and if the
> first user fails to complete it on time then we could trigger a Java
> service task that reassigns the task to next available user in the group.
>
> The above suggestion was given based on the details given in the
> thread, not sure whether it best suits to all requirements. We can revisit
> the scenario when there are more additional details. :)
>
> Best regards,
> Amal.
>
> On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera 
> wrote:
>
>> I have the following requirement:
>>
>> * By default the given process's instance is claimable by user1
>> * But when user1 is on vacation (we have this data in a DB) we
>> want user2 to be able to claim it
>>
>> I can think of two ways:
>>
>> 1. Create a temporary role and keep switching user1 and user2 in
>> and out that role
>> 2. Keep monitoring all claimable tasks and make it claimable to
>> user2 if user1 is not there
>>
>> Is there a better way (eg: specify this requirement directly in
>> BPMN). If not which is the better option?
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> *Amal Gunatilake*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>



 --
 With regards,
 *Manu*ranga Perera.

 phone : 071 7 70 20 50
 mail : m...@wso2.com

>>>
>>>
>>>
>>> --
>>> With regards,
>>> *Manu*ranga Perera.
>>>
>>> phone : 071 7 70 20 50
>>> mail : m...@wso2.com
>>>
>>
>>
>>
>> --
>> *Amal Gunatilake*
>> Software 

Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Manuranga Perera
Hi Amal,


> When the main user fails to complete the task within the deadline, the
> timer boundary event will trigger the Java service task. Then within the
> Java service task, we can dynamically assign the task to next user by
> reading the list of candidate users saved inside the process variable.


The requirement is not to do it by time, (as the user store in the first
mail) tasks has to be made claimable to the other user at the time task
starts, if the user is on vacation. So we have to listen to some task start
event.


On Thu, Apr 21, 2016 at 11:06 AM, Amal Gunatilake  wrote:

> Yes, according to the updates we cannot use the candidateGroups attribute
> because it results in showing the task to every other user in the role.
> (And not possible when users are in different roles)
>
> Therefore, as an alternative, we can have the main user put in assignee
> attribute and rest of the candidate users in a variable within the process
> stored as a list. This will prevent the task visibility to other candidate
> users.
>
> When the main user fails to complete the task within the deadline, the
> timer boundary event will trigger the Java service task. Then within the
> Java service task, we can dynamically assign the task to next user by
> reading the list of candidate users saved inside the process variable.
>
> Best regards,
> Amal.
>
> On Thu, Apr 21, 2016 at 8:22 PM, Manuranga Perera  wrote:
>
>> BTW, I have found a bit old discussion [1] on activity site. I am looking
>> to that options as well.
>>
>> [1] https://forums.activiti.org/content/dynamic-assignment
>>
>> On Thu, Apr 21, 2016 at 10:49 AM, Manuranga Perera  wrote:
>>
>>> Hi Amal,
>>> Thanks for the suggestion.
>>>
>>> I have also considered that option. But I thought it had the following
>>> limitations:
>>>   * When users are in different roles. Eg: "product lead" should take
>>> over when "team lead" is on vacation. But by default  "team lead" shouldn't
>>> see all the tasks for "product lead"
>>>   * Works when we want to specify 'candidateGroups' , but not when we
>>> need to specify 'assignee'
>>>
>>> May be these limitations are fine for the current use-case. I am also
>>> still gathering requirements. I'll keep this as the preferred option. Just
>>> wanted to see what are the other options.
>>>
>>> On Thu, Apr 21, 2016 at 10:29 AM, Amal Gunatilake 
>>> wrote:
>>>
 Hi Manuranga,

 What you have suggested is also possible. On the other hand, I have
 another suggestion.

 When we assign user1 and user2 to the same role and then we define
 only candidateGroups attribute to user task element, the tasks become
 available to both users and who ever available can claim them and continue.
 Also, we can have a timer boundary event to define a deadline and if the
 first user fails to complete it on time then we could trigger a Java
 service task that reassigns the task to next available user in the group.

 The above suggestion was given based on the details given in the
 thread, not sure whether it best suits to all requirements. We can revisit
 the scenario when there are more additional details. :)

 Best regards,
 Amal.

 On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera 
 wrote:

> I have the following requirement:
>
> * By default the given process's instance is claimable by user1
> * But when user1 is on vacation (we have this data in a DB) we
> want user2 to be able to claim it
>
> I can think of two ways:
>
> 1. Create a temporary role and keep switching user1 and user2 in
> and out that role
> 2. Keep monitoring all claimable tasks and make it claimable to
> user2 if user1 is not there
>
> Is there a better way (eg: specify this requirement directly in BPMN).
> If not which is the better option?
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



 --
 *Amal Gunatilake*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

>>>
>>>
>>>
>>> --
>>> With regards,
>>> *Manu*ranga Perera.
>>>
>>> phone : 071 7 70 20 50
>>> mail : m...@wso2.com
>>>
>>
>>
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> *Amal Gunatilake*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>



-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Process Center] Permission API in Registry

2016-04-21 Thread Manuranga Perera
Hi Yasima,
Are you trying to retrieve permission of the dashboard or some other
resource (profile pic, video)?

On Wed, Apr 20, 2016 at 4:57 AM, Mushthaq Rumy  wrote:

> Hi,
>
>
> There is a class called PermissionUtil in org.wso2.carbon.registry.
> resource.services.utils package in the Registry. You can use the
> getPermissions method in the above class to get the permission level.
>
> Thanks & Regards,
>
> On Wed, Apr 20, 2016 at 1:44 PM, Yasima Dewmini  wrote:
>
>> Hi,
>>
>> I'm from PC team and I'm implementing process level permission support
>> for PC. I need to get the permission level given resource, action and the
>> user.
>> Can I know the permission API used for this in Registry?
>>
>>
>> Thanks and Regards,
>> Yasima.
>>
>> --
>> Yasima Dewmini
>> Software Engineer, WSO2, Inc.
>> Mobile: 0713117081
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Mushthaq Rumy
> *Software Engineer*
> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
> Email : musht...@wso2.com
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middleware.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Rasika Perera
Hi Megala,

[ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
> (default-compile) on project appserver-utils: Fatal error compiling:
> invalid target release: 1.8 -> [Help 1]

You need to compile with JDK1.8 for AS v6.0.0 master branch. Please refer
[1].

[INFO] WSO2 AppServer Distribution having apache ldap server feature
> installed FAILURE [  3.839 s]
> Exception in thread "main"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "main"

Try export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=128m'[2].

[1] https://github.com/wso2/product-as/blob/master/pom.xml#L500
[2] https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

On Thu, Apr 21, 2016 at 7:45 PM, Megala Uthayakumar  wrote:

> Hi,
>
> I am still getting the same errors. As per [1], I set MAVEN_OPTS="-Xms768m
> -Xmx3072m -XX:MaxPermSize=1200m" . Still I am getting the same errors.
>
> [1] https://docs.wso2.com/display/AS530/Get+Involved
>
> Thanks
>
> On Thu, Apr 21, 2016 at 7:29 PM, Mushthaq Rumy  wrote:
>
>> Hi,
>>
>> Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set
>> it and try to build it.
>>
>> Thanks & Regards,
>>
>> On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar 
>> wrote:
>>
>>>
>>> Hi All,
>>>
>>> I am trying to build the product-as from the source. When tried to build
>>> v5.3.0, I got the following error and build failed.
>>>
>>> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
>>> installed FAILURE [  3.839 s]*
>>>
>>> *Exception in thread "main" *
>>> *Exception: java.lang.OutOfMemoryError thrown from the
>>> UncaughtExceptionHandler in thread "main"*
>>>
>>> After that I tried to build from the master branch, but got following
>>> error,
>>> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>>>  1.542 s]*
>>>
>>> *[ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
>>> (default-compile) on project appserver-utils: Fatal error compiling:
>>> invalid target release: 1.8 -> [Help 1]*
>>>
>>> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>>>
>>> Could someone point out what is the cause for these errors?
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Megala
>>>
>>> --
>>> Megala Uthayakumar
>>>
>>> Software Engineer
>>> Mobile : 0779967122
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Mushthaq Rumy
>> *Software Engineer*
>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>> Email : musht...@wso2.com
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middleware.
>>
>
>
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: rasi...@wso2.com
LinkedIn: http://lk.linkedin.com/in/rasika90

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Amal Gunatilake
Yes, according to the updates we cannot use the candidateGroups attribute
because it results in showing the task to every other user in the role.
(And not possible when users are in different roles)

Therefore, as an alternative, we can have the main user put in assignee
attribute and rest of the candidate users in a variable within the process
stored as a list. This will prevent the task visibility to other candidate
users.

When the main user fails to complete the task within the deadline, the
timer boundary event will trigger the Java service task. Then within the
Java service task, we can dynamically assign the task to next user by
reading the list of candidate users saved inside the process variable.

Best regards,
Amal.

On Thu, Apr 21, 2016 at 8:22 PM, Manuranga Perera  wrote:

> BTW, I have found a bit old discussion [1] on activity site. I am looking
> to that options as well.
>
> [1] https://forums.activiti.org/content/dynamic-assignment
>
> On Thu, Apr 21, 2016 at 10:49 AM, Manuranga Perera  wrote:
>
>> Hi Amal,
>> Thanks for the suggestion.
>>
>> I have also considered that option. But I thought it had the following
>> limitations:
>>   * When users are in different roles. Eg: "product lead" should take
>> over when "team lead" is on vacation. But by default  "team lead" shouldn't
>> see all the tasks for "product lead"
>>   * Works when we want to specify 'candidateGroups' , but not when we
>> need to specify 'assignee'
>>
>> May be these limitations are fine for the current use-case. I am also
>> still gathering requirements. I'll keep this as the preferred option. Just
>> wanted to see what are the other options.
>>
>> On Thu, Apr 21, 2016 at 10:29 AM, Amal Gunatilake  wrote:
>>
>>> Hi Manuranga,
>>>
>>> What you have suggested is also possible. On the other hand, I have
>>> another suggestion.
>>>
>>> When we assign user1 and user2 to the same role and then we define
>>> only candidateGroups attribute to user task element, the tasks become
>>> available to both users and who ever available can claim them and continue.
>>> Also, we can have a timer boundary event to define a deadline and if the
>>> first user fails to complete it on time then we could trigger a Java
>>> service task that reassigns the task to next available user in the group.
>>>
>>> The above suggestion was given based on the details given in the thread,
>>> not sure whether it best suits to all requirements. We can revisit the
>>> scenario when there are more additional details. :)
>>>
>>> Best regards,
>>> Amal.
>>>
>>> On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera  wrote:
>>>
 I have the following requirement:

 * By default the given process's instance is claimable by user1
 * But when user1 is on vacation (we have this data in a DB) we want
 user2 to be able to claim it

 I can think of two ways:

 1. Create a temporary role and keep switching user1 and user2 in
 and out that role
 2. Keep monitoring all claimable tasks and make it claimable to
 user2 if user1 is not there

 Is there a better way (eg: specify this requirement directly in BPMN).
 If not which is the better option?

 --
 With regards,
 *Manu*ranga Perera.

 phone : 071 7 70 20 50
 mail : m...@wso2.com

>>>
>>>
>>>
>>> --
>>> *Amal Gunatilake*
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
*Amal Gunatilake*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Manuranga Perera
BTW, I have found a bit old discussion [1] on activity site. I am looking
to that options as well.

[1] https://forums.activiti.org/content/dynamic-assignment

On Thu, Apr 21, 2016 at 10:49 AM, Manuranga Perera  wrote:

> Hi Amal,
> Thanks for the suggestion.
>
> I have also considered that option. But I thought it had the following
> limitations:
>   * When users are in different roles. Eg: "product lead" should take over
> when "team lead" is on vacation. But by default  "team lead" shouldn't see
> all the tasks for "product lead"
>   * Works when we want to specify 'candidateGroups' , but not when we need
> to specify 'assignee'
>
> May be these limitations are fine for the current use-case. I am also
> still gathering requirements. I'll keep this as the preferred option. Just
> wanted to see what are the other options.
>
> On Thu, Apr 21, 2016 at 10:29 AM, Amal Gunatilake  wrote:
>
>> Hi Manuranga,
>>
>> What you have suggested is also possible. On the other hand, I have
>> another suggestion.
>>
>> When we assign user1 and user2 to the same role and then we define
>> only candidateGroups attribute to user task element, the tasks become
>> available to both users and who ever available can claim them and continue.
>> Also, we can have a timer boundary event to define a deadline and if the
>> first user fails to complete it on time then we could trigger a Java
>> service task that reassigns the task to next available user in the group.
>>
>> The above suggestion was given based on the details given in the thread,
>> not sure whether it best suits to all requirements. We can revisit the
>> scenario when there are more additional details. :)
>>
>> Best regards,
>> Amal.
>>
>> On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera  wrote:
>>
>>> I have the following requirement:
>>>
>>> * By default the given process's instance is claimable by user1
>>> * But when user1 is on vacation (we have this data in a DB) we want
>>> user2 to be able to claim it
>>>
>>> I can think of two ways:
>>>
>>> 1. Create a temporary role and keep switching user1 and user2 in and
>>> out that role
>>> 2. Keep monitoring all claimable tasks and make it claimable to
>>> user2 if user1 is not there
>>>
>>> Is there a better way (eg: specify this requirement directly in BPMN).
>>> If not which is the better option?
>>>
>>> --
>>> With regards,
>>> *Manu*ranga Perera.
>>>
>>> phone : 071 7 70 20 50
>>> mail : m...@wso2.com
>>>
>>
>>
>>
>> --
>> *Amal Gunatilake*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Manuranga Perera
Hi Amal,
Thanks for the suggestion.

I have also considered that option. But I thought it had the following
limitations:
  * When users are in different roles. Eg: "product lead" should take over
when "team lead" is on vacation. But by default  "team lead" shouldn't see
all the tasks for "product lead"
  * Works when we want to specify 'candidateGroups' , but not when we need
to specify 'assignee'

May be these limitations are fine for the current use-case. I am also still
gathering requirements. I'll keep this as the preferred option. Just wanted
to see what are the other options.

On Thu, Apr 21, 2016 at 10:29 AM, Amal Gunatilake  wrote:

> Hi Manuranga,
>
> What you have suggested is also possible. On the other hand, I have
> another suggestion.
>
> When we assign user1 and user2 to the same role and then we define
> only candidateGroups attribute to user task element, the tasks become
> available to both users and who ever available can claim them and continue.
> Also, we can have a timer boundary event to define a deadline and if the
> first user fails to complete it on time then we could trigger a Java
> service task that reassigns the task to next available user in the group.
>
> The above suggestion was given based on the details given in the thread,
> not sure whether it best suits to all requirements. We can revisit the
> scenario when there are more additional details. :)
>
> Best regards,
> Amal.
>
> On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera  wrote:
>
>> I have the following requirement:
>>
>> * By default the given process's instance is claimable by user1
>> * But when user1 is on vacation (we have this data in a DB) we want
>> user2 to be able to claim it
>>
>> I can think of two ways:
>>
>> 1. Create a temporary role and keep switching user1 and user2 in and
>> out that role
>> 2. Keep monitoring all claimable tasks and make it claimable to user2
>> if user1 is not there
>>
>> Is there a better way (eg: specify this requirement directly in BPMN). If
>> not which is the better option?
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> *Amal Gunatilake*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>



-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Make tasks claimable conditionaly

2016-04-21 Thread Amal Gunatilake
Hi Manuranga,

What you have suggested is also possible. On the other hand, I have another
suggestion.

When we assign user1 and user2 to the same role and then we define
only candidateGroups attribute to user task element, the tasks become
available to both users and who ever available can claim them and continue.
Also, we can have a timer boundary event to define a deadline and if the
first user fails to complete it on time then we could trigger a Java
service task that reassigns the task to next available user in the group.

The above suggestion was given based on the details given in the thread,
not sure whether it best suits to all requirements. We can revisit the
scenario when there are more additional details. :)

Best regards,
Amal.

On Thu, Apr 21, 2016 at 7:16 PM, Manuranga Perera  wrote:

> I have the following requirement:
>
> * By default the given process's instance is claimable by user1
> * But when user1 is on vacation (we have this data in a DB) we want
> user2 to be able to claim it
>
> I can think of two ways:
>
> 1. Create a temporary role and keep switching user1 and user2 in and
> out that role
> 2. Keep monitoring all claimable tasks and make it claimable to user2
> if user1 is not there
>
> Is there a better way (eg: specify this requirement directly in BPMN). If
> not which is the better option?
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
*Amal Gunatilake*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-21 Thread Kasun De Silva
Yes, debug the getPods() method in KubernetesProvisioningUtils.java and
check on the the returning object. Also check the label map is correct or
not. Related pods are selected according to the label map.

On Thu, Apr 21, 2016 at 1:43 AM, Sabra Ossen  wrote:

> Hi Kasun,
>
> I also found an article at [1] on the internal structure of the appmgt
> jaggery app. Based on my understanding I haven't called the getPods method
> in the correct jag file which should be the
> modules/application/application.jag file. Apart from modifying the jaggery
> files to add my requirement I will debug the getPods method and post the
> updates in this mail thread.
>
> [1]
> http://wso2.com/library/tutorials/2012/09/customizing-api-store-publisher-part1/
>
> Thanks and Regards.
> Sabra.
>
>
> On Wed, Apr 20, 2016 at 8:46 PM, Kasun De Silva  wrote:
>
>> Hi Sabra,
>>
>> First check the related pod list coming to the Kubernetes Provisioning
>> Component.
>>
>> At this point I would debug getPods() method
>> in KubernetesProvisioningUtils.java and check whether that the correct
>> selector label map and the pod list are available there.
>>
>> Thanks,
>> Kasun
>>
>>
>> On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen  wrote:
>>
>>> Hi All,
>>>
>>> I deployed an app in my app cloud local set up and I have modified the
>>> code in "/site/themes/default/templates/home/template.jag" such that once
>>> the application home page is loaded (after the application has been clicked
>>> from the list of created apps) the list of pods for that particular
>>> application should be displayed.
>>>
>>> The code is as follows.
>>>
>>> var KubernetesProvisioningUtils =  
>>> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
>>> var Util = Packages.org.wso2.appcloud.core.Util;
>>>
>>> var modManager = jagg.module("manager");
>>> var tenantId = modManager.getTenantId();
>>> var versionHashId = Util.getVersionHashId(applicationName, 
>>> selectedRevision, tenantId);
>>>
>>> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
>>> applicationName, selectedRevision, null , modManager.getTenantId(), 
>>> modManager.getTenantDomain(), versionHashId);
>>>
>>> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>>>
>>> %>
>>> 
>>> var podList = "<%=podList%>";
>>> alert(podList);
>>> 
>>> <%
>>>
>>>
>>> Using js I printed the podList but it returns "{}".
>>>
>>> I checked the kubernetes cluster and details of the pod which contains
>>> the app can be seen as well. But I cannot obtain it from the jaggery app.
>>> Any help on this issue is appreciated.
>>>
>>> Thanks and Regards.
>>>
>>> --
>>> *Sabra Ossen*
>>> *Software Engineer*
>>> Email: sa...@wso2.com
>>> Mobile: +94 767 837356
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Kasun de Silva*
>> Software Engineer | *WSO2 Inc.*; http://wso2.com
>> lean.enterprise.middleware
>>
>> email   : kas...@wso2.com
>> mobile : +94 77 794 4260
>>
>>
>
>
> --
> *Sabra Ossen*
> *Software Engineer*
> Email: sa...@wso2.com
> Mobile: +94 767 837356
>



-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : kas...@wso2.com
mobile : +94 77 794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Megala Uthayakumar
Hi,

I am still getting the same errors. As per [1], I set MAVEN_OPTS="-Xms768m
-Xmx3072m -XX:MaxPermSize=1200m" . Still I am getting the same errors.

[1] https://docs.wso2.com/display/AS530/Get+Involved

Thanks

On Thu, Apr 21, 2016 at 7:29 PM, Mushthaq Rumy  wrote:

> Hi,
>
> Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set
> it and try to build it.
>
> Thanks & Regards,
>
> On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar 
> wrote:
>
>>
>> Hi All,
>>
>> I am trying to build the product-as from the source. When tried to build
>> v5.3.0, I got the following error and build failed.
>>
>> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
>> installed FAILURE [  3.839 s]*
>>
>> *Exception in thread "main" *
>> *Exception: java.lang.OutOfMemoryError thrown from the
>> UncaughtExceptionHandler in thread "main"*
>>
>> After that I tried to build from the master branch, but got following
>> error,
>> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>>  1.542 s]*
>>
>> *[ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
>> (default-compile) on project appserver-utils: Fatal error compiling:
>> invalid target release: 1.8 -> [Help 1]*
>>
>> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>>
>> Could someone point out what is the cause for these errors?
>>
>> Thank you.
>>
>> Regards,
>> Megala
>>
>> --
>> Megala Uthayakumar
>>
>> Software Engineer
>> Mobile : 0779967122
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Mushthaq Rumy
> *Software Engineer*
> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
> Email : musht...@wso2.com
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middleware.
>



-- 
Megala Uthayakumar

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


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Mushthaq Rumy
Hi,

Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set it
and try to build it.

Thanks & Regards,

On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar  wrote:

>
> Hi All,
>
> I am trying to build the product-as from the source. When tried to build
> v5.3.0, I got the following error and build failed.
>
> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
> installed FAILURE [  3.839 s]*
>
> *Exception in thread "main" *
> *Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "main"*
>
> After that I tried to build from the master branch, but got following
> error,
> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>  1.542 s]*
>
> *[ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
> (default-compile) on project appserver-utils: Fatal error compiling:
> invalid target release: 1.8 -> [Help 1]*
>
> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>
> Could someone point out what is the cause for these errors?
>
> Thank you.
>
> Regards,
> Megala
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Mushthaq Rumy
*Software Engineer*
Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
Email : musht...@wso2.com
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Task instance not appearing in claimable task list

2016-04-21 Thread Manuranga Perera
>
> So admin can't see all the tasks.

Well, you kind-of can. If you go to the search view you can see, and you
can even claim.

But I think this is good, I can see the reason.
Thanks Firzhan.

On Wed, Apr 20, 2016 at 11:02 PM, Firzhan Naqash  wrote:

> Yeah.
>
> During defining the form properties, you have to define the candidate
> groups or assignee. If we haven't define any values, then activiti will be
> storing an empty field.
>
> So admin can't see all the tasks. Tasks are purely based on role members
> or users.
>
> Regards,
> Firzhan
>
>
> --
> *Firzhan Naqash*
> Senior Software Engineer - Integration Platform Team
> WSO2 Inc. http://wso2.com
>
> email: firz...@wso2.com
> mobile: (+94) 77 9785674 <%28%2B94%29%2071%205247551>*|
> blog: http://firzhanblogger.blogspot.com/
>   *
> *twitter: https://twitter.com/firzhan007
>  | linked-in: 
> **https://www.linkedin.com/in/firzhan
> *
>
> On Wed, Apr 20, 2016 at 6:32 PM, Manuranga Perera  wrote:
>
>> Ok, thanks everyone for the quick response.
>> I assumed the expected behavior is, admin can see all the tasks as
>> claimable. Is that a wrong assumption?
>>
>
>


-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Make tasks claimable conditionaly

2016-04-21 Thread Manuranga Perera
I have the following requirement:

* By default the given process's instance is claimable by user1
* But when user1 is on vacation (we have this data in a DB) we want
user2 to be able to claim it

I can think of two ways:

1. Create a temporary role and keep switching user1 and user2 in and
out that role
2. Keep monitoring all claimable tasks and make it claimable to user2
if user1 is not there

Is there a better way (eg: specify this requirement directly in BPMN). If
not which is the better option?

-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS] Help to build product-as

2016-04-21 Thread Megala Uthayakumar
Hi All,

I am trying to build the product-as from the source. When tried to build
v5.3.0, I got the following error and build failed.

*[INFO] WSO2 AppServer Distribution having apache ldap server feature
installed FAILURE [  3.839 s]*

*Exception in thread "main" *
*Exception: java.lang.OutOfMemoryError thrown from the
UncaughtExceptionHandler in thread "main"*

After that I tried to build from the master branch, but got following error,
*[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
 1.542 s]*

*[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
(default-compile) on project appserver-utils: Fatal error compiling:
invalid target release: 1.8 -> [Help 1]*

I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9

Could someone point out what is the cause for these errors?

Thank you.

Regards,
Megala

-- 
Megala Uthayakumar

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


Re: [Dev] Error while implementing the Integration test for salesforce(SOAP API) connector

2016-04-21 Thread Hariprasath Thanarajah
Noted malaka.

On Thursday, April 21, 2016, Malaka Silva  wrote:

> Hi Hariprasath,
>
> Best is start debugging fresh pack with the release tag and apply the fix
> and check [1].
>
> Did you check this with esb 5 alpha alread? If not do so.
>
> [1]
> https://docs.wso2.com/display/TA430/Debugging+Product+Integration+Tests
>
> On Thu, Apr 21, 2016 at 2:53 AM, Hariprasath Thanarajah <
> haripras...@wso2.com
> > wrote:
>
>> As malaka said this is slightly different from the usual way and Malaka,
>> I copied the patch to the folder and put the zip to the repository. Need to
>> investigate further.
>>
>>
>> On Wednesday, April 20, 2016, Malaka Silva > > wrote:
>>
>>> Hariprasath is doing this for connectors. It is slightly different than
>>> running esb integration tests. We need to copy the zip file
>>> to repository folder. Hope you have updated the zip file with patch in that
>>> case.
>>>
>>> On Wed, Apr 20, 2016 at 10:08 PM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Hi Hariprasath,

 Did you apply the patch manually  to the pack when you run the
 integration test? AFAIK when you run integration tests it will use the
 already built default pack. It will not contains the patch.

 Thanks
 Thusitha

 On Wed, Apr 20, 2016 at 9:32 AM, Malaka Silva  wrote:

> Hi Hariprasath,
>
> You need to debug and investigate this further. Find details on
> debugging integration test in [1]
>
> [1]
> https://docs.wso2.com/display/TA430/Debugging+Product+Integration+Tests
>
> On Wed, Apr 20, 2016 at 6:18 PM, Hariprasath Thanarajah <
> haripras...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have apply the patch to ESB 4.9.0 have mentioned above in [1], but
>> I  got the same error. If I create the test case for another
>> method(describeSObject) also show the same error. I have attached the 
>> wire
>> log for this method also,
>>
>> Can anyone give any suggestion on this?
>>
>> On Tue, Apr 19, 2016 at 1:36 PM, Hariprasath Thanarajah <
>> haripras...@wso2.com> wrote:
>>
>>> Noted Malaka,
>>>
>>> I will check and update on this.
>>>
>>> On Tue, Apr 19, 2016 at 1:11 PM, Malaka Silva 
>>> wrote:
>>>
 Hi Hariprasath,

 Seems like a issue is mentioned in [1]. Ideally this should be
 fixed in ESB alpha release. Please check.

 If not apply the fix and see if that works. If works add a jira for
 esb 5.

 [1] https://wso2.org/jira/browse/ESBJAVA-4388

 On Thu, Apr 7, 2016 at 3:59 PM, Hariprasath Thanarajah <
 haripras...@wso2.com> wrote:

> Hi All,
>
> I am working on to create integration test for salesforce
> connector. When I create the testcase for a particular 
> method(getUserInfo)
> I got the response via the ESB call but after that I get the following
> error in [1].
>
> I have added the proxy[2] and soap request[3] as well.
>
> Can anyone suggest me what could be the reason for this follwing
> error.
>
> [1]
> FAILED: testGetUserInfoWithMandatoryParameters
> Salesforce {getUserInfo} integration test with mandatory
> parameters.
> java.lang.NullPointerException
> at
> org.apache.axis2.transport.http.AbstractHTTPSender.processCookieHeaders(AbstractHTTPSender.java:213)
> at
> org.apache.axis2.transport.http.AbstractHTTPSender.obtainHTTPHeaderInformation(AbstractHTTPSender.java:170)
> at
> org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:224)
> at
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:294)
> at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
> at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
>  

Re: [Dev] [appcloud] Unable to connect to Docker Client from local set up

2016-04-21 Thread Punnadi Gunarathna
Hi Sabra,

Did you run dockerImages.sh file?

On Thu, Apr 21, 2016 at 5:26 PM, Sabra Ossen  wrote:

> Hi All,
>
> I have created a local setup and I am trying to create an app in app
> cloud. I get the following stack trace.
>
> INFO {module/application/application.jag} -  Application Launch URL:
> carbon-super-bwsam-1-0-0.apps.cloud.wso2.com
> {module/application/application.jag}
> TID: [0] [AS] [2016-04-21 17:04:10,331] ERROR
> {org.wso2.appcloud.core.docker.DockerOpClient} -  Build Failure:Failed to
> connect to /192.168.18.2:2375
> {org.wso2.appcloud.core.docker.DockerOpClient}
> TID: [0] [AS] [2016-04-21 17:04:10,332] ERROR
> {org.wso2.appcloud.core.docker.DockerOpClient} -  Docker image building
> failed: msf4j repo: registry.182.docker.appfactory.private.wso2.com:5000
> docker file:
> /home/sabra/WSO2/AppCloud/Local//setup/wso2as-5.2.1//repository/deployment/server/jaggeryapps/appmgt//tmpUploadedApps/carbon.super/3219047332775631666/
> tag: 1.0-3219047332775631666 {org.wso2.appcloud.core.docker.DockerOpClient}
> TID: [0] [AS] [2016-04-21 17:04:10,338]  INFO
> {module/application/application.jag} -  Retrying docker build retry counter
> value : 0 {module/application/application.jag}
> TID: [0] [AS] [2016-04-21 17:06:19,226] ERROR
> {org.wso2.appcloud.core.docker.DockerOpClient} -  Build Failure:Failed to
> connect to /192.168.18.2:2375
> {org.wso2.appcloud.core.docker.DockerOpClient}
> TID: [0] [AS] [2016-04-21 17:06:19,355] ERROR
> {org.wso2.appcloud.core.docker.DockerOpClient} -  Push Failure:Failed to
> connect to /192.168.18.2:2375
> {org.wso2.appcloud.core.docker.DockerOpClient}
> TID: [0] [AS] [2016-04-21 17:06:19,355] ERROR
> {org.wso2.appcloud.core.docker.DockerOpClient} -  Docker image push failed:
> msf4j repo: registry.182.docker.appfactory.private.wso2.com:5000 tag:
> 1.0-3219047332775631666 {org.wso2.appcloud.core.docker.DockerOpClient}
> TID: [0] [AS] [2016-04-21 17:06:19,381] ERROR
> {module/application/application.jag} -  Error uploading docker image to
> remote registry {module/application/application.jag}
> TID: [0] [AS] [2016-04-21 17:06:19,381] ERROR
> {module/application/application.jag} -
>  org.mozilla.javascript.WrappedException: Wrapped
> org.wso2.appcloud.common.AppCloudException: Docker image push failed: msf4j
> repo: registry.182.docker.appfactory.private.wso2.com:5000 tag:
> 1.0-3219047332775631666 (/appmgt/modules/application/application.jag#100)
> at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
> at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c1._c_anonymous_3(/appmgt/modules/application/application.jag:100)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c1.call(/appmgt/modules/application/application.jag)
> at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c1._c_anonymous_1(/appmgt/modules/application/application.jag:78)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c1.call(/appmgt/modules/application/application.jag)
> at
> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
> at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
> at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
> at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c0._c_anonymous_1(/appmgt/modules/application/module.jag:22)
> at
> org.jaggeryjs.rhino.appmgt.modules.application.c0.call(/appmgt/modules/application/module.jag)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at
> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1._c_anonymous_1(/appmgt/site/blocks/application/application.jag:83)
> at
> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1.call(/appmgt/site/blocks/application/application.jag)
> at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
> at
> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1._c_script_0(/appmgt/site/blocks/application/application.jag:27)
> at
> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1.call(/appmgt/site/blocks/application/application.jag)
> at
> org.jaggeryjs.rhino.appmgt.site.blocks.application.c1.exec(/appmgt/site/blocks/application/application.jag)
> at
> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
> at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
> at
> org.jaggeryjs.jaggery.core.manager.WebAppManager.executeScript(WebAppManager.java:268)
> at
> org.jaggeryjs.jaggery.core.manager.WebAppManager.include(WebAppManager.java:122)
> at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
> at
> 

Re: [Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-21 Thread Sabra Ossen
Hi Kasun,

I also found an article at [1] on the internal structure of the appmgt
jaggery app. Based on my understanding I haven't called the getPods method
in the correct jag file which should be the
modules/application/application.jag file. Apart from modifying the jaggery
files to add my requirement I will debug the getPods method and post the
updates in this mail thread.

[1]
http://wso2.com/library/tutorials/2012/09/customizing-api-store-publisher-part1/

Thanks and Regards.
Sabra.


On Wed, Apr 20, 2016 at 8:46 PM, Kasun De Silva  wrote:

> Hi Sabra,
>
> First check the related pod list coming to the Kubernetes Provisioning
> Component.
>
> At this point I would debug getPods() method
> in KubernetesProvisioningUtils.java and check whether that the correct
> selector label map and the pod list are available there.
>
> Thanks,
> Kasun
>
>
> On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen  wrote:
>
>> Hi All,
>>
>> I deployed an app in my app cloud local set up and I have modified the
>> code in "/site/themes/default/templates/home/template.jag" such that once
>> the application home page is loaded (after the application has been clicked
>> from the list of created apps) the list of pods for that particular
>> application should be displayed.
>>
>> The code is as follows.
>>
>> var KubernetesProvisioningUtils =  
>> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
>> var Util = Packages.org.wso2.appcloud.core.Util;
>>
>> var modManager = jagg.module("manager");
>> var tenantId = modManager.getTenantId();
>> var versionHashId = Util.getVersionHashId(applicationName, selectedRevision, 
>> tenantId);
>>
>> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
>> applicationName, selectedRevision, null , modManager.getTenantId(), 
>> modManager.getTenantDomain(), versionHashId);
>>
>> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>>
>> %>
>> 
>> var podList = "<%=podList%>";
>> alert(podList);
>> 
>> <%
>>
>>
>> Using js I printed the podList but it returns "{}".
>>
>> I checked the kubernetes cluster and details of the pod which contains
>> the app can be seen as well. But I cannot obtain it from the jaggery app.
>> Any help on this issue is appreciated.
>>
>> Thanks and Regards.
>>
>> --
>> *Sabra Ossen*
>> *Software Engineer*
>> Email: sa...@wso2.com
>> Mobile: +94 767 837356
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Kasun de Silva*
> Software Engineer | *WSO2 Inc.*; http://wso2.com
> lean.enterprise.middleware
>
> email   : kas...@wso2.com
> mobile : +94 77 794 4260
>
>


-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev