# How to write RPC callback without callpoint defined in yang

**URL:** <https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650>\
**Category:** NETCONF\
**Created:** [August 22, 2019, 2:26am UTC](https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650 "2019-08-22T02:26:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alnz](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@alnz](https://dmap-community.ductus.global/u/alnz)\
**Post date:** [August 22, 2019, 2:26am UTC](https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650/1 "2019-08-22T02:26:11Z")

</div>

I know that in Example of cond, we can define: tailf:actionpoint activate-point in an RPC YANG definition, in that way, we can create:

```java
@ActionCallback(callPoint = "activate-point", callType =
                ActionCBType.ACTION)

```

to reply that RPC call.

BUT some yang files RPC does not set this `tailf:actionpoint` element, how we define our ActionCallback method [JAVA]??

e,g.

```auto
rpc software-activate {
     input {
      leaf slot-name {
       ....
    }
    output {
      leaf status {
      ...........

```

* * *

in examples.confd\intro\java\12-maapi, there are :

```java
@ActionCallback(callPoint = "show_items_with_value_cp", callType =
                ActionCBType.COMMAND)

```

===\> where “show\_items\_with\_value\_cp” was defined, what is COMMAND

```auto
   @DataCallback(callPoint = maapi_example.callpoint_items,
                callType = DataCBType.GET_NEXT) 

```

===\> what is DataCallback

where we can find document on these , not ound in usage doc or example.

---

<div class="post-metadata">

**Author:** ![mnovak](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mnovak/32/183_2.png) [@mnovak](https://dmap-community.ductus.global/u/mnovak)\
**Post date:** [August 23, 2019, 8:25am UTC](https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650/2 "2019-08-23T08:25:19Z")

</div>

In example `examples.confd\intro\java\12-maapi` the callpoint is not YANG action callpoint, but clispec callpoint, found in `commands-c.cli`.

Example how to use actions is in `examples.confd/intro/java/7-actions/config.yang`. The `tailf:action` is present inside YANG file. If you have yang file that cannot be modified, you can write action into separate annotation file and annotate it. See ConfD user guide, YNAG chapter - `Using a YANG annotation file` and `tailf:annotation` statement.

---

<div class="post-metadata">

**Author:** ![alnz](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@alnz](https://dmap-community.ductus.global/u/alnz)\
**Post date:** [August 23, 2019, 9:40am UTC](https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650/3 "2019-08-23T09:40:07Z")

</div>

Thanks mnovak, basically I got what you mean, but could you give a little more description on `clispec` callpoint,

also where I can find doc on actionCB or dataCB.

---

<div class="post-metadata">

**Author:** ![mnovak](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mnovak/32/183_2.png) [@mnovak](https://dmap-community.ductus.global/u/mnovak)\
**Post date:** [August 23, 2019, 10:51am UTC](https://dmap-community.ductus.global/t/how-to-write-rpc-callback-without-callpoint-defined-in-yang/2650/4 "2019-08-23T10:51:35Z")

</div>

Clispec action point is described in ConfD User guide - chapter `clispec` - `/clispec/$MODE/cmd/callback/capi`.

For action callback and data callback see examples `7-actions` and `4-stats` + corresponding JAVA DOC (part of ConfD Premium package).
