cancel
Showing results for 
Search instead for 
Did you mean: 

iView eventing

Former Member
0 Kudos

Hi,

Is it possible to use iview eventing between a custom (PDK java) iview, and a VC iview?

Best regards,

David

Accepted Solutions (1)

Accepted Solutions (1)

Lisi
Advisor
Advisor
0 Kudos

Hi David,

Yes, it is possible. You should do the following:

<b>1</b>.Create a java iView that fires an event.

<b>2</b>.Create an iView in the Visual Composer with an input port

<b>3</b>.Right click on the input port and select "Define Properties"

•The input port should be named exactly the same as the event name in the java iView.

•The name space (EPCM event) should also be identical to the one in the java iView

•You have got to have in the input port exactly the same field names as in the fired event

If you place both iViews on the same page in the portal, the event should work.

Regards,

Lisi

Message was edited by: Elizabeth Gutt

Former Member
0 Kudos

Hi Elizabeth,

In "define properties" for my input port (for an input form) in Visual Composer, I only see the following in the "Behavior" part:

"Name"

"Dynamic?"

"Capacity"

"Role" = IN

I guess I should put the event name (in my case "buttonpressed") in the Name property.

But where should I put the name space ?

Thanks in advance,

David

Former Member
0 Kudos

Hi,

You're looking at a form's input port whereas you should have an IView input port (input relay). You can find it in the "Elements" task pane under "Flow Control" group.

You should then create one in the diagram and connect it to the input form (or RFC, whatever) you want.

In the input relay properties you'll find the requested properties. The "EPCM Event" property should include the namespace as well.

Hope this helps,

Lior

Former Member
0 Kudos

Thanks Lior for the info!

I am now using the input relay, but now I have another problem. The VC iview now receives an event but my BAPI_BANK_GETLIST returns the error "Country not defined" as if the field BANK_CTRY (that I transfer) is empty. I have defined the field BANK_CTRY (string) in the input port, which again is passed to the BAPI. The sender iview works (I tested it against another PDK java iview).

I looked at the following javascript code snippet via "View source":

-


<script language="JavaScript">

function signalIn_AEB7B(e) {

var actorid='AEB7B';

var data=e.dataObject;

var input= null;

for (var f in data) {

input = getHTMLBComponent(actorid + '_' + f);

if (input) input.formelement.value=data[f];

}

htmlbexternal_submit_();

}

function getHTMLBComponent(componentName) {

var funcName = htmlb_formid + "_getHtmlbElementId";

func = window[funcName];

var component = eval(func(componentName));

return component;

}

EPCM.subscribeEventReliable('urn:RIGCALLOrgParProject2','buttonpressed',signalIn_AEB7B);

</script>

-


but this looks very generic and is problay ok. The EPCM.subscribeEventReliable call, looks ok when checking with the PDK documentation. Seems to be signature 1: "EPCM.subscribeEventReliable( nameSpace, eventName, eventHandler )".

Do you have any ideas what could be the error causing no data to be transferred?

Or any troubleshooting ideas?

Best regards,

David

Former Member
0 Kudos

Hi,

Are you sending the data in the EPCM event from the PDK iview?

Are you sending a field with the same name as in the input port?

btw - what version (patch) are you using?

Lior

Former Member
0 Kudos

Hi Lior,

1) Yes, via the code:

-


........

IEpcfToolbox myServ = (IEpcfToolbox) request.getService(IEpcfToolbox.KEY);

IClientEventSender mySender = myServ.getClientEventSender(request, XURN, XEVENT);

..........

if (inputString1 != null) {

mySender.setParameter("BANK_CTRY", inputString1);

myForm.addRawText(mySender.getWrappedScript());

......

-


2) Yes the field BANK_CTRY is the same as on the input port (same spelling and uppercase all the way).

3) I have not patched VC, so I guess I should patch up to patch2?

(portal version is EP 60 SP 2 Patch 4 HF7 + VC addons)

Best regards,

David

Former Member
0 Kudos

Hi,

Make sure that the parameter from the input relay is mapped correctly to the BAPI input port (on the connector line).

As for patches, I think patch 3 is available.

Lior

Answers (0)