How to register a custom module in OTRS 2.4 - otrs

I have written a custom module for OTRS which is more or less a copy of an existing module (AgentTicketSearch). I placed it in Kernel\Modules\ like it was said in the developer manual.
When i try to use it, i get the following Errormessage:
"Module
Kernel::Modules::AgentTicketMyModule
not registered in Kernel/Config.pm!"
Question: How do i register custom modules in the config.pm?

are you talking about an event handler or what type of module? you will need to add configuration items to the sysconfig for event handlers.
see also : http://forums.otterhub.org/viewtopic.php?f=64&t=10911

Related

getting value of action in ember route-action helper

Please refer to this issue:
https://github.com/DockYard/ember-route-action-helper/issues/27
I am facing similar issue, posting it here again:
Is there any solution to this issue?
I am trying to use route-action helper for checkbox as follows:
Select All
It calls my action inside route, but it is passing some event object instead of checked value (I am expecting true/false) like it does for the usual action helper:
I am also facing the same issue while using select drodown:
-- JDBC or HDFS load? --
JDBC
HDFS
Here I am expecting to get the values JDBC or HDFS when the actions is fired.
If it can be done by writing action to receive full event, please give some example how to extract required information from the event.
I am new to ember. Please help.

WSO2 Siddhi RDBMS Store Extension - how to set batchEnable to false

I'm using siddhi to create some app which also interacts with PostgreSQL DB. Although I'm not sure, I believe, there is a bug about making multiple updates on the same PG table, within a single event (i.e. upon receiving an event, update a record in the table, and create another one again in the same table) it seems the batch updates are causing some problems. SO, I just want to give it a try after disabling batchUpdate (it is enabled by default). I just don't know how to configure it using siddhi-sdk (via Intellij plugin). There are two related tickets:
https://github.com/wso2-extensions/siddhi-store-rdbms/issues/43
https://github.com/wso2/product-sp/issues/472
Until these are documented, I'd like to get some quick response how to set these fields.
Best regards...
I'm using siddhi to create some app which also interacts with PostgreSQL DB. Although I'm not sure, I believe, there is a bug about making multiple updates on the same PG table, within a single event (i.e. upon receiving an event, update a record in the table, and create another one again in the same table) it seems the batch updates are causing some problems.
When batchEnabled has been set to true, it will perform the insert/update operation on batch of events instead of performing those operations on each and every single event. Simply, this has been introduced to improve the performance.
The default value of this parameter is currently set to "true".
However, batchEnable configurations is done through a system parameter called, "{{RDBMS-Name}}.batchEnable" which have to be configured in the WSO2 Stream Processor's deployment.yaml
If you want to overide this property in Product-SP please find the steps below.
Open the deployment.yaml file located in {Product-SP-Home}/conf/editor/
Insert the following lines in the file.
siddhi:
extensions:
extension:
name: store
namespace: rdbms
properties:
PostgreSQL.batchEnable: true
But currently there is no way to overwrite those system configurations from the siddhi app level. Since you are using the SDK, what you can do is changing the default value of above parameter to "false".
Please find the steps below do it.
Find the siddhi-store-rdbms-4.x.xx.jar file in the siddhi
sdk. This is located in the {siddhi-sdk-home}/lib/ .
Open the jar file using an archive manager and open the
rdbms-table-config.xml file located inside it with a text editor.
Set false in <batchEnable>true</batchEnable> attribute under the
<database name="PostgreSQL"> tag and save it.
Thanks Raveen. with a simple dash (-) before "extension" I was able to set the config.
siddhi:
extensions:
- extension:
name: store
namespace: rdbms
properties:
PostgreSQL.batchEnable: false

wso2am 2.1.0 API export - No enum constant APIDTO.TypeEnum.NULL

exporting an API definition through a REST service service I got a following exception:
ERROR - GlobalThrowableMapper An Unknown exception has been captured by global exception mapper.
java.lang.IllegalArgumentException: No enum constant org.wso2.carbon.apimgt.rest.api.publisher.dto.APIDTO.TypeEnum.NULL
at java.lang.Enum.valueOf(Enum.java:238)
at org.wso2.carbon.apimgt.rest.api.publisher.dto.APIDTO$TypeEnum.valueOf(APIDTO.java:63)
at org.wso2.carbon.apimgt.rest.api.publisher.utils.mappings.APIMappingUtil.fromAPItoDTO(APIMappingUtil.java:239)
at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServiceImpl.apisApiIdGet(ApisApiServiceImpl.java:380)
at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisApiIdGet(ApisApi.java:229)
If I import an API through the REST APIM API, I can GET / export it. As soon I update the set of resources manually in the publisher (I delete a resource and add another one), this exception occurs.
Thank you all for any hint
It's bug in API manager, it has resolved in issue https://wso2.org/jira/browse/APIMANAGER-5759. The pull request has just merged recently, till now, till now there's no official build including this. However you can manually patch it in your system.
Apparently some things which seems to be optional need to be defined to make the API exportable, such as parameter description. Specifying a parameter description helped in this case

Custom Jetty Filters in Dropwizard

I'm attempting to add a custom header filter in my Dropwizard instance to check to see if the request's version is synced to the Dropwizard instance's version.
I see you can use FilterBuilder to add jetty CrossOriginFilters. However, I am having trouble figuring out how to set a custom filter.
Thanks
Via the Environment class.
https://dropwizard.github.io/dropwizard/manual/core.html#environments
#Override
public void run(MyApplicationConfiguration configuration, Environment environment) {
environment.servlets().addFilter("Custom-Filter-Name", new MyCustomFilter()).addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
}
You can choose which Dispatch types by changing EnumSet.allOf(DispatcherType.class)
This is how I got it to work using Dropwwizard 0.7.1 (APIs appear to have changed from other examples I found out there)
In run method of your application:
final FilterRegistration.Dynamic cors = environment.servlets().addFilter("crossOriginRequsts", CrossOriginFilter.class);
cors.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
https://gist.github.com/craigbeck/fb71818063175b9b4210

WSO2 GR: add application artifact and lifecyle when defining new application in the GR

I have a WSO2 Goverance Registry setup conformant to this blog post http://blog.shelan.org/2013/02/application-governance-with-wso2-greg.html.
When defining a new application in the WSO2 GR using the menu: Metadata > Add > Application I would like to be able to directly add the actual application artifact (war/car file).
The selected file should then by placed in the SVN location conforming to the initial state of the lifecycle to which I will bind the application. This of course implies that I would also need to be able to directly add the lifecycle when defining a new application.
The new application form would then be something like this:
Name: ExampleApplication-1.0.0
Type: .war (is now redundant)
Description: My Example Application Artifact: Selected file
ExampleApplication-1.0.0.war Lifecyle: MyDTAP-Lifecycle_v1
Does anybody know a good starting point for adding this functionality in terms of code hooks or extension points?
If I have understood you correctly, what you need to do is basically provide an file upload option in your "Application" RXT (Governance Artifact Configuration) which will upload what ever your file type and based on that you want to fill the derivable information to the meta data of the artifact. And also to attach a selected/pre defined life cycle to it at artifact creation. What you are looking for is Registry Handlers [1]. You can achieve all aforementioned tasks probably through a single handler.
[1] - http://docs.wso2.org/wiki/display/Governance453/Handlers